@@ -243,7 +243,7 @@ |
||
| 243 | 243 | <td><br></td> |
| 244 | 244 | <td><br></td> |
| 245 | 245 | "; |
| 246 | - } else { |
|
| 246 | + } else { |
|
| 247 | 247 | $c = class_name($class); |
| 248 | 248 | echo " |
| 249 | 249 | <td><b>".spaces($level)."$unit->name</b></td> |
@@ -75,8 +75,7 @@ discard block |
||
| 75 | 75 | if (!(strcmp($cpid,"0"))) { |
| 76 | 76 | $newcpid=random_string(); |
| 77 | 77 | echo "Problematic CPID=0 for [$id] $email_addr gets CPID=$newcpid<br/>"; |
| 78 | - } |
|
| 79 | - else |
|
| 78 | + } else |
|
| 80 | 79 | $newcpid=$cpid; |
| 81 | 80 | |
| 82 | 81 | if (strcmp($email_addr, $new_email) || strcmp($newcpid,$cpid)) { |
@@ -84,8 +83,7 @@ discard block |
||
| 84 | 83 | if ($confirm != "yes") { |
| 85 | 84 | echo "QUERY WOULD BE [$id] $query <br/>[click the link at the bottom to enable]<br/>"; |
| 86 | 85 | $update_needed = TRUE; |
| 87 | - } |
|
| 88 | - else { |
|
| 86 | + } else { |
|
| 89 | 87 | _mysql_query($update); |
| 90 | 88 | echo "Doing $update<br/>\n"; |
| 91 | 89 | } |
@@ -37,7 +37,7 @@ |
||
| 37 | 37 | FROM forum_preferences as prefs, user |
| 38 | 38 | WHERE CONVERT(special_user, DECIMAL) > 0 and prefs.userid=user.id" |
| 39 | 39 | ); |
| 40 | -for ($i=1; $i<=_mysql_num_rows($result); $i++){ |
|
| 40 | +for ($i=1; $i<=_mysql_num_rows($result); $i++) { |
|
| 41 | 41 | $foo = _mysql_fetch_object($result); |
| 42 | 42 | echo "<form action=\"manage_special_users_action.php\" method=\"POST\">\n"; |
| 43 | 43 | echo "<input type=\"hidden\" name=\"userid\" value=\"$foo->userid\" |
@@ -39,8 +39,8 @@ discard block |
||
| 39 | 39 | |
| 40 | 40 | // Delete a user if they have no credit, results, or posts |
| 41 | 41 | // |
| 42 | -function possibly_delete_user($user){ |
|
| 43 | - if ($user->total_credit > 0.0){ |
|
| 42 | +function possibly_delete_user($user) { |
|
| 43 | + if ($user->total_credit > 0.0) { |
|
| 44 | 44 | admin_error_page("Cannot delete user: User has credit."); |
| 45 | 45 | } |
| 46 | 46 | |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | admin_error_page("Cannot delete user: User has forum posts."); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - if ($user->teamid){ |
|
| 59 | + if ($user->teamid) { |
|
| 60 | 60 | user_quit_team($user); |
| 61 | 61 | } |
| 62 | 62 | delete_user($user); |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | |
| 101 | 101 | // put a timestamp in wiki to trigger re-validation of credentials |
| 102 | 102 | |
| 103 | - if (function_exists('touch_wiki_user')){ |
|
| 103 | + if (function_exists('touch_wiki_user')) { |
|
| 104 | 104 | touch_wiki_user($user); |
| 105 | 105 | } |
| 106 | 106 | |
@@ -274,7 +274,7 @@ discard block |
||
| 274 | 274 | do_query("alter table host add max_results_day integer not null"); |
| 275 | 275 | } |
| 276 | 276 | |
| 277 | -function update_4_20_2005(){ |
|
| 277 | +function update_4_20_2005() { |
|
| 278 | 278 | do_query("ALTER TABLE `thread` ADD `sticky` TINYINT UNSIGNED DEFAULT '0' NOT NULL"); |
| 279 | 279 | do_query("ALTER TABLE `forum` ADD `post_min_total_credit` INT NOT NULL AFTER `posts`"); |
| 280 | 280 | do_query("ALTER TABLE `forum` ADD `post_min_expavg_credit` INT NOT NULL AFTER `posts`"); |
@@ -284,7 +284,7 @@ discard block |
||
| 284 | 284 | do_query("ALTER TABLE `forum_preferences` ADD `last_post` INT( 14 ) UNSIGNED NOT NULL AFTER `posts`"); |
| 285 | 285 | } |
| 286 | 286 | |
| 287 | -function update_4_30_2005(){ |
|
| 287 | +function update_4_30_2005() { |
|
| 288 | 288 | do_query("ALTER TABLE `forum_preferences` ADD `ignore_sticky_posts` TINYINT( 1 ) UNSIGNED NOT NULL"); |
| 289 | 289 | } |
| 290 | 290 | |
@@ -311,7 +311,7 @@ discard block |
||
| 311 | 311 | do_query("update user set country='Macedonia' where country='Macedonia, The Former Yugoslav Republic of'"); |
| 312 | 312 | } |
| 313 | 313 | |
| 314 | -function update_11_24_2005(){ |
|
| 314 | +function update_11_24_2005() { |
|
| 315 | 315 | do_query("ALTER TABLE `forum_preferences` ADD `minimum_wrap_postcount` INT DEFAULT '100' NOT NULL AFTER `high_rating_threshold` , |
| 316 | 316 | ADD `display_wrap_postcount` INT DEFAULT '75' NOT NULL AFTER `minimum_wrap_postcount`"); |
| 317 | 317 | } |
@@ -616,7 +616,7 @@ discard block |
||
| 616 | 616 | "); |
| 617 | 617 | } |
| 618 | 618 | |
| 619 | -function update_10_05_2008(){ |
|
| 619 | +function update_10_05_2008() { |
|
| 620 | 620 | do_query("alter table forum_preferences add highlight_special tinyint default '1' not null"); |
| 621 | 621 | } |
| 622 | 622 | |
@@ -229,7 +229,7 @@ |
||
| 229 | 229 | _mysql_query($query); |
| 230 | 230 | } |
| 231 | 231 | $globals->count--; |
| 232 | - if ($globals->count == 0) { |
|
| 232 | + if ($globals->count == 0) { |
|
| 233 | 233 | echo "reached limit set by --count - exiting...\n"; |
| 234 | 234 | exit(); |
| 235 | 235 | } |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | |
| 42 | 42 | |
| 43 | 43 | // returns formatted data size |
| 44 | -function size_format($size){ |
|
| 44 | +function size_format($size) { |
|
| 45 | 45 | $retval = 0; |
| 46 | 46 | |
| 47 | 47 | $KB = 1024; |
@@ -65,8 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | |
| 67 | 67 | // returns the DB data structure as DB_REC |
| 68 | -function get_db_info($db_name) |
|
| 69 | -{ |
|
| 68 | +function get_db_info($db_name) { |
|
| 70 | 69 | // Carl grabbed this from the mysql.com boards http://dev.mysql.com/doc/refman/5.0/en/show-table-status.html |
| 71 | 70 | $result = _mysql_query("SHOW TABLE STATUS FROM $db_name"); |
| 72 | 71 | |
@@ -105,8 +104,7 @@ discard block |
||
| 105 | 104 | |
| 106 | 105 | |
| 107 | 106 | // shows the plain db structure |
| 108 | -function show_db_info($db_name, $db_rec) |
|
| 109 | -{ |
|
| 107 | +function show_db_info($db_name, $db_rec) { |
|
| 110 | 108 | |
| 111 | 109 | echo "<table cols=6>"; |
| 112 | 110 | echo "<tr>"; |
@@ -122,7 +120,7 @@ discard block |
||
| 122 | 120 | echo "<th>Avg. Size per Row</th>"; |
| 123 | 121 | echo "</tr>"; |
| 124 | 122 | |
| 125 | - for ($i = 0; $i < sizeof($db_rec)-1; $i++){ |
|
| 123 | + for ($i = 0; $i < sizeof($db_rec)-1; $i++) { |
|
| 126 | 124 | echo "<tr>"; |
| 127 | 125 | echo "<td align=left valign=top class=fieldname>" . $db_rec[$i]->name . "</td>"; |
| 128 | 126 | echo "<td align=left valign=top class=fieldname>" . size_format($db_rec[$i]->data_size) . "</td>"; |
@@ -150,8 +148,7 @@ discard block |
||
| 150 | 148 | |
| 151 | 149 | |
| 152 | 150 | // NB: same as show_db_info but with sortable cloumns |
| 153 | -function sort_db_info($db_name, $db_rec) |
|
| 154 | -{ |
|
| 151 | +function sort_db_info($db_name, $db_rec) { |
|
| 155 | 152 | // sort |
| 156 | 153 | $file_list = array(); |
| 157 | 154 | $file_sort = array(); |
@@ -171,7 +168,7 @@ discard block |
||
| 171 | 168 | $sort = "name"; |
| 172 | 169 | if(empty($r)) $r=0; |
| 173 | 170 | |
| 174 | - for ($i = 0; $i < sizeof($db_rec)-1; $i++){ |
|
| 171 | + for ($i = 0; $i < sizeof($db_rec)-1; $i++) { |
|
| 175 | 172 | $file_details["name"] = $db_rec[$i]->name; |
| 176 | 173 | $file_details["data_size"] = $db_rec[$i]->data_size; |
| 177 | 174 | $file_details["index_size"] = $db_rec[$i]->index_size; |
@@ -43,14 +43,15 @@ |
||
| 43 | 43 | $forum_preferencess = _mysql_query("select * from forum_preferences where userid>$start_id order by userid"); |
| 44 | 44 | echo _mysql_error(); |
| 45 | 45 | $i=0; |
| 46 | - while ($forum_preferences = _mysql_fetch_object($forum_preferencess)){ |
|
| 46 | + while ($forum_preferences = _mysql_fetch_object($forum_preferencess)) { |
|
| 47 | 47 | $i++; |
| 48 | - if ($i%100 == 0) { //For every 100 forum_preferencess |
|
| 48 | + if ($i%100 == 0) { |
|
| 49 | +//For every 100 forum_preferencess |
|
| 49 | 50 | echo $forum_preferences->userid.". "; flush(); // print out where we are |
| 50 | 51 | //usleep(200000); |
| 51 | 52 | } |
| 52 | 53 | |
| 53 | - if ($forum_preferences->userid > $start_id){ |
|
| 54 | + if ($forum_preferences->userid > $start_id) { |
|
| 54 | 55 | fix_forum_preferences($forum_preferences); |
| 55 | 56 | } |
| 56 | 57 | } |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | |
| 35 | 35 | start_table(); |
| 36 | 36 | |
| 37 | -switch($table){ |
|
| 37 | +switch($table) { |
|
| 38 | 38 | case "platform": |
| 39 | 39 | break; |
| 40 | 40 | case "app": |