@@ -7,14 +7,11 @@ |
||
7 | 7 | list($module, $api) = func_get_args(); |
8 | 8 | if ($module == "input_formats" && $api == "input_formats") { |
9 | 9 | return array("version" => 1); |
10 | - } |
|
11 | - elseif ($module == "page_manager" && $api == "pages_default") { |
|
10 | + } elseif ($module == "page_manager" && $api == "pages_default") { |
|
12 | 11 | return array("version" => 1); |
13 | - } |
|
14 | - elseif ($module == "panels_mini" && $api == "panels_default") { |
|
12 | + } elseif ($module == "panels_mini" && $api == "panels_default") { |
|
15 | 13 | return array("version" => 1); |
16 | - } |
|
17 | - elseif ($module == "strongarm" && $api == "strongarm") { |
|
14 | + } elseif ($module == "strongarm" && $api == "strongarm") { |
|
18 | 15 | return array("version" => 1); |
19 | 16 | } |
20 | 17 | } |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | // only do files ending in .po |
71 | - if (substr($file,-3) != ".po"){ |
|
71 | + if (substr($file,-3) != ".po") { |
|
72 | 72 | //debug("File $file with unknown extension found in $info_dir"); |
73 | 73 | continue; |
74 | 74 | } |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | "-------------Compiling $transdir$file------------", 0 |
77 | 77 | ); |
78 | 78 | $language = parse_po_file($langdir.$transdir.$file); |
79 | - if (!$language){ |
|
79 | + if (!$language) { |
|
80 | 80 | language_log( |
81 | 81 | "WARNING: Could not parse language ".$file |
82 | 82 | ); |
@@ -95,7 +95,7 @@ discard block |
||
95 | 95 | ); |
96 | 96 | exit; |
97 | 97 | } |
98 | - foreach ($language as $key => $value){ |
|
98 | + foreach ($language as $key => $value) { |
|
99 | 99 | if ($value !== "") { |
100 | 100 | // Skip if the msgstr is empty |
101 | 101 | fwrite($fh, "\$language_lookup_array[\"".str_replace("\"", "\\\"", substr($file,0,-3))."\"][\"".$key."\"] = \"".$value."\";\n"); |
@@ -121,13 +121,13 @@ discard block |
||
121 | 121 | $parsing_text = false; |
122 | 122 | $size = sizeof($translation_file); |
123 | 123 | $output = array(); |
124 | - for ($i=0; $i<$size; $i++){ |
|
124 | + for ($i=0; $i<$size; $i++) { |
|
125 | 125 | $entry = trim($translation_file[$i]); |
126 | 126 | //echo "line $i: $entry\n"; |
127 | 127 | if (substr($entry, 0, 1)=="#") { |
128 | 128 | continue; |
129 | 129 | } elseif (strpos($entry, "msgid") !== false) { |
130 | - if (!$first_entry){ |
|
130 | + if (!$first_entry) { |
|
131 | 131 | //If this is not the first, save the previous entry |
132 | 132 | $output[$current_token]=$current_token_text; |
133 | 133 | } |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | |
150 | 150 | // Get the last token |
151 | 151 | // |
152 | - if ($current_token && $current_token_text){ |
|
152 | + if ($current_token && $current_token_text) { |
|
153 | 153 | $output[$current_token] = $current_token_text; |
154 | 154 | } |
155 | 155 | return $output; |
@@ -180,11 +180,11 @@ discard block |
||
180 | 180 | |
181 | 181 | // Find the string in the user's language |
182 | 182 | // |
183 | - foreach ($languages_in_use as $language){ |
|
183 | + foreach ($languages_in_use as $language) { |
|
184 | 184 | if (isset($language_lookup_array[$language][$text])) { |
185 | 185 | $text = $language_lookup_array[$language][$text]; |
186 | 186 | break; |
187 | - } else if ($language=="en"){ |
|
187 | + } else if ($language=="en") { |
|
188 | 188 | // This language is defined in the code and is always available |
189 | 189 | break; |
190 | 190 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | // Replace relevant substrings with given arguments. |
194 | 194 | // Use strtr to avoid problems if an argument contains %n. |
195 | 195 | $replacements = array(); |
196 | - for ($i=1; $i<func_num_args(); $i++){ |
|
196 | + for ($i=1; $i<func_num_args(); $i++) { |
|
197 | 197 | $replacements["%".$i] = func_get_arg($i); |
198 | 198 | } |
199 | 199 | |
@@ -217,7 +217,7 @@ discard block |
||
217 | 217 | if ($loglevel==1) $msg = "[ Warning ]"; |
218 | 218 | if ($loglevel==2) $msg = "[ CRITICAL ]"; |
219 | 219 | |
220 | - if ($loglevel >= $lang_log_level){ |
|
220 | + if ($loglevel >= $lang_log_level) { |
|
221 | 221 | echo gmdate("Y-m-d H:i:s", time())." ".$msg." ".$message."\n"; |
222 | 222 | } |
223 | 223 | } |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | // (by looking at cookies and browser settings) |
227 | 227 | // cookies have highest priority. |
228 | 228 | |
229 | -if (isset($_COOKIE['lang'])){ |
|
229 | +if (isset($_COOKIE['lang'])) { |
|
230 | 230 | $language_string = $_COOKIE['lang'].","; |
231 | 231 | } else { |
232 | 232 | $language_string = ''; |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | for ($i=0; $i<$size; $i++) { |
261 | 261 | if ((strlen($client_languages[$i])>2) |
262 | 262 | && (substr($client_languages[$i], 2, 1) == "_" || substr($client_languages[$i], 2, 1) == "-") |
263 | - ){ |
|
263 | + ) { |
|
264 | 264 | // If this is defined as primary-secondary, represent it as xx_YY |
265 | 265 | // |
266 | 266 | $language = substr( |
@@ -287,7 +287,7 @@ discard block |
||
287 | 287 | // |
288 | 288 | $file_name = $lang_language_dir.$lang_compiled_dir.$language.".po.inc"; |
289 | 289 | if (file_exists($file_name)) { |
290 | - if (!in_array($language, $languages_in_use)){ |
|
290 | + if (!in_array($language, $languages_in_use)) { |
|
291 | 291 | require_once($file_name); |
292 | 292 | $languages_in_use[] = $language; |
293 | 293 | } |
@@ -295,7 +295,7 @@ discard block |
||
295 | 295 | if ($language2) { |
296 | 296 | $file_name = $lang_language_dir.$lang_compiled_dir.$language2.".po.inc"; |
297 | 297 | if (file_exists($file_name)) { |
298 | - if (!in_array($language2, $languages_in_use)){ |
|
298 | + if (!in_array($language2, $languages_in_use)) { |
|
299 | 299 | require_once($file_name); |
300 | 300 | $languages_in_use[] = $language2; |
301 | 301 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | |
239 | 239 | // return a string for navigating pages |
240 | 240 | // |
241 | -function page_links($url, $nitems, $items_per_page, $start){ |
|
241 | +function page_links($url, $nitems, $items_per_page, $start) { |
|
242 | 242 | // How many pages to potentially show before and after this one: |
243 | 243 | $preshow = 3; |
244 | 244 | $postshow = 3; |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | |
252 | 252 | // If this is not the first page, display "previous" |
253 | 253 | // |
254 | - if ($curpage > 0){ |
|
254 | + if ($curpage > 0) { |
|
255 | 255 | $x .= page_link( |
256 | 256 | $url, $curpage-1, $items_per_page, |
257 | 257 | tra("Previous")." · " |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | } |
269 | 269 | // Display a list of pages surrounding this one |
270 | 270 | // |
271 | - for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++){ |
|
271 | + for ($i=$curpage-$preshow; $i<=$curpage+$postshow; $i++) { |
|
272 | 272 | $page_str = (string)($i+1); |
273 | 273 | if ($i < 0) continue; |
274 | 274 | if ($i >= $npages) break; |
@@ -289,7 +289,7 @@ discard block |
||
289 | 289 | } |
290 | 290 | // If there is a next page |
291 | 291 | // |
292 | - if ($curpage < $npages-1){ |
|
292 | + if ($curpage < $npages-1) { |
|
293 | 293 | $x .= page_link( |
294 | 294 | $url, $curpage+1, $items_per_page, |
295 | 295 | " · ".tra("Next") |
@@ -518,7 +518,7 @@ discard block |
||
518 | 518 | |
519 | 519 | // If the user no longer exists, skip the post |
520 | 520 | // |
521 | - if (!$user){ |
|
521 | + if (!$user) { |
|
522 | 522 | return; |
523 | 523 | } |
524 | 524 | |
@@ -539,9 +539,9 @@ discard block |
||
539 | 539 | // check whether the poster is on the list of people to ignore |
540 | 540 | // |
541 | 541 | $ignore_poster = false; |
542 | - if ($logged_in_user){ |
|
542 | + if ($logged_in_user) { |
|
543 | 543 | $tokens = url_tokens($logged_in_user->authenticator); |
544 | - if (is_ignoring($logged_in_user, $user)){ |
|
544 | + if (is_ignoring($logged_in_user, $user)) { |
|
545 | 545 | $ignore_poster = true; |
546 | 546 | } |
547 | 547 | } |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | |
579 | 579 | // Highlight special users if set in prefs; |
580 | 580 | // |
581 | - if ($logged_in_user && $logged_in_user->prefs){ |
|
581 | + if ($logged_in_user && $logged_in_user->prefs) { |
|
582 | 582 | $highlight = $logged_in_user->prefs->highlight_special && $is_posted_by_special; |
583 | 583 | } else { |
584 | 584 | $highlight = $is_posted_by_special; |
@@ -599,7 +599,7 @@ discard block |
||
599 | 599 | echo "<span class=\"small\">"; |
600 | 600 | if ($fstatus) echo "$fstatus"; |
601 | 601 | |
602 | - if (!$filter || !$ignore_poster){ |
|
602 | + if (!$filter || !$ignore_poster) { |
|
603 | 603 | if ($user->prefs && $user->prefs->avatar!="" && (!$logged_in_user || ($logged_in_user->prefs->hide_avatars==false))) { |
604 | 604 | echo "<img width=\"".AVATAR_WIDTH."\" height=\"".AVATAR_HEIGHT."\" src=\"".avatar_url($user->prefs->avatar)."\" alt=\"Avatar\"><br>"; |
605 | 605 | } |
@@ -615,7 +615,7 @@ discard block |
||
615 | 615 | $user->nposts = BoincPost::count("user=$user->id"); |
616 | 616 | } |
617 | 617 | |
618 | - if (function_exists('project_forum_user_info')){ |
|
618 | + if (function_exists('project_forum_user_info')) { |
|
619 | 619 | project_forum_user_info($user); |
620 | 620 | } else { |
621 | 621 | echo tra("Posts: %1", $user->nposts)."<br>"; |
@@ -654,7 +654,7 @@ discard block |
||
654 | 654 | echo "<form action=\"forum_rate.php?post=", $post->id, "\" method=\"post\">"; |
655 | 655 | } |
656 | 656 | |
657 | - if ($logged_in_user && $post->timestamp > $latest_viewed){ |
|
657 | + if ($logged_in_user && $post->timestamp > $latest_viewed) { |
|
658 | 658 | show_image(NEW_IMAGE, tra("You haven't read this message yet"), tra("Unread"), NEW_IMAGE_HEIGHT); |
659 | 659 | } |
660 | 660 | |
@@ -674,7 +674,7 @@ discard block |
||
674 | 674 | if ($post->modified) { |
675 | 675 | echo "<br>".tra("Last modified: %1", pretty_time_Str($post->modified)); |
676 | 676 | } |
677 | - if ($ignore_poster && $filter){ |
|
677 | + if ($ignore_poster && $filter) { |
|
678 | 678 | echo "<br>" .tra( |
679 | 679 | "This post is hidden because the sender is on your 'ignore' list. Click %1 here %2 to view hidden posts", |
680 | 680 | "<a href=\"?id=".$thread->id."&filter=false&start=$start#".$post->id."\">", |
@@ -688,7 +688,7 @@ discard block |
||
688 | 688 | <p> |
689 | 689 | "; |
690 | 690 | |
691 | - if (!$filter || !$ignore_poster){ |
|
691 | + if (!$filter || !$ignore_poster) { |
|
692 | 692 | $posttext = $post->content; |
693 | 693 | |
694 | 694 | // If the creator of this post has a signature and |
@@ -696,7 +696,7 @@ discard block |
||
696 | 696 | // user has signatures enabled: show it |
697 | 697 | // |
698 | 698 | $posttext = output_transform($posttext, $options); |
699 | - if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)){ |
|
699 | + if ($post->signature && (!$logged_in_user || !$logged_in_user->prefs->hide_signatures)) { |
|
700 | 700 | $sig = output_transform($user->prefs->signature, $options); |
701 | 701 | $posttext .= "<hr>$sig\n"; |
702 | 702 | } |
@@ -755,7 +755,7 @@ discard block |
||
755 | 755 | $content = output_transform($post->content, $options); |
756 | 756 | $when = time_diff_str($post->timestamp, time()); |
757 | 757 | $user = BoincUser::lookup_id($post->user); |
758 | - if (!$user){ |
|
758 | + if (!$user) { |
|
759 | 759 | return; |
760 | 760 | } |
761 | 761 | |
@@ -1089,7 +1089,7 @@ discard block |
||
1089 | 1089 | |
1090 | 1090 | $sql = 'forum = ' . $forumID ; |
1091 | 1091 | $stickysql = ""; |
1092 | - if ($sticky){ |
|
1092 | + if ($sticky) { |
|
1093 | 1093 | $stickysql = "sticky DESC, "; |
1094 | 1094 | } |
1095 | 1095 | if (!$show_hidden) { |
@@ -1170,7 +1170,7 @@ discard block |
||
1170 | 1170 | // |
1171 | 1171 | function show_post_moderation_links( |
1172 | 1172 | $config, $logged_in_user, $post, $forum, $tokens |
1173 | -){ |
|
1173 | +) { |
|
1174 | 1174 | $moderators_allowed_to_ban = parse_bool($config, "moderators_allowed_to_ban"); |
1175 | 1175 | $moderators_vote_to_ban = parse_bool($config, "moderators_vote_to_ban"); |
1176 | 1176 |
@@ -35,14 +35,14 @@ |
||
35 | 35 | } |
36 | 36 | |
37 | 37 | $owner = BoincUser::lookup_id($thread->owner); |
38 | -if ($logged_in_user->id == $owner->id){ |
|
38 | +if ($logged_in_user->id == $owner->id) { |
|
39 | 39 | $action = get_str("action"); |
40 | 40 | if ($action == "set") { |
41 | 41 | $ret = $thread->update("status=1"); |
42 | 42 | } else { |
43 | 43 | $ret = $thread->update("status=0"); |
44 | 44 | } |
45 | - if (!$ret){ |
|
45 | + if (!$ret) { |
|
46 | 46 | error_page("Could not update the status of the thread: ".$thread->id); |
47 | 47 | } |
48 | 48 | } else { |
@@ -38,8 +38,8 @@ discard block |
||
38 | 38 | proc_terminate($p); |
39 | 39 | // echo "child process is $ret\n"; |
40 | 40 | $pids=preg_split('/\s+/',$ret); |
41 | - foreach($pids as $pid){ |
|
42 | - if(is_numeric($pid)){ |
|
41 | + foreach($pids as $pid) { |
|
42 | + if(is_numeric($pid)) { |
|
43 | 43 | if($GLOBALS["debug"])echo "killing child process $pid\n"; |
44 | 44 | posix_kill($pid,9); |
45 | 45 | } |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | $p = proc_open("$cmd", $descs, $pipes); |
61 | 61 | while (1) { |
62 | 62 | $ctime=time(); |
63 | - if($ctime-$stime >=2 and ! file_exists("log.1")){ |
|
63 | + if($ctime-$stime >=2 and ! file_exists("log.1")) { |
|
64 | 64 | if($GLOBALS["debug"]) echo "time out "."<br>"; |
65 | 65 | terminate_job($p); |
66 | 66 | break; |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | $steps = $end_step-$start_step; |
158 | 158 | $avg_cpu = $cpu/$steps; |
159 | 159 | #$avg_cpu = $cpu/$count; |
160 | - if ($GLOBALS["debug"]){ |
|
160 | + if ($GLOBALS["debug"]) { |
|
161 | 161 | echo "test steps is ".$steps."<br>"; |
162 | 162 | echo "avg_cpu is ".$avg_cpu."<br>"; |
163 | 163 | } |
@@ -169,20 +169,19 @@ discard block |
||
169 | 169 | return array($avg_cpu,$test_steps); |
170 | 170 | } |
171 | 171 | |
172 | -function calc_est_size($lammps_script, $structure_file, $cmd_file,$test_steps){ |
|
172 | +function calc_est_size($lammps_script, $structure_file, $cmd_file,$test_steps) { |
|
173 | 173 | $dump_types = 0; |
174 | 174 | $fd = fopen($lammps_script,"r"); |
175 | - if (!$fd){ |
|
175 | + if (!$fd) { |
|
176 | 176 | echo "can not open file $lammps_script\n"; |
177 | 177 | exit(-1); |
178 | 178 | } |
179 | - while (!feof($fd)){ |
|
179 | + while (!feof($fd)) { |
|
180 | 180 | $line = fgets($fd, 4096); |
181 | 181 | //if (preg_match("/^\s*dump/", $line) |
182 | 182 | // and preg_match_all("/dump\S+\.\w{3}/", $line, $matches, PREG_PATTERN_ORDER)) |
183 | 183 | |
184 | - if(preg_match("/^\s*dump\s+(\d)\s+/", $line,$matches)) |
|
185 | - { |
|
184 | + if(preg_match("/^\s*dump\s+(\d)\s+/", $line,$matches)) { |
|
186 | 185 | if($GLOBALS["debug"]){print "matches=";print_r($matches);} |
187 | 186 | |
188 | 187 | $dump_types=(int)$matches[1]; |
@@ -194,7 +193,7 @@ discard block |
||
194 | 193 | |
195 | 194 | $structure_file_size = filesize($structure_file); |
196 | 195 | $fd = fopen($cmd_file,"r"); |
197 | - if (!$fd){ |
|
196 | + if (!$fd) { |
|
198 | 197 | echo "can not open file $cmd_file\n"; |
199 | 198 | exit(-1); |
200 | 199 | } |
@@ -202,10 +201,10 @@ discard block |
||
202 | 201 | |
203 | 202 | $loopno=1; |
204 | 203 | $looprun=1; |
205 | - while (!feof($fd)){ |
|
204 | + while (!feof($fd)) { |
|
206 | 205 | $line = fgets($fd,4096); |
207 | - if(preg_match("/loopnumber\s+\d+/", $line, $matches)){ |
|
208 | - if(preg_match("/\d+/", $matches[0], $no)){ |
|
206 | + if(preg_match("/loopnumber\s+\d+/", $line, $matches)) { |
|
207 | + if(preg_match("/\d+/", $matches[0], $no)) { |
|
209 | 208 | //$loopno=$no[0]; |
210 | 209 | if($no[0]>$loopno)$loopno=$no[0]; |
211 | 210 | } |
@@ -215,7 +214,7 @@ discard block |
||
215 | 214 | } |
216 | 215 | } |
217 | 216 | fclose($fd); |
218 | - if($GLOBALS["debug"]){ |
|
217 | + if($GLOBALS["debug"]) { |
|
219 | 218 | print "max loopno(number of loops to run)=".$loopno."<br>"; |
220 | 219 | print "max looprun(steps for each loop)=".$looprun."<br>"; |
221 | 220 | } |
@@ -231,7 +230,7 @@ discard block |
||
231 | 230 | $app_fixed_size = 5e7; |
232 | 231 | $est_size = $log_size+$dump_size+$app_fixed_size; |
233 | 232 | |
234 | - if($GLOBALS["debug"]){ |
|
233 | + if($GLOBALS["debug"]) { |
|
235 | 234 | print "test_steps=".$test_steps."<br>"; |
236 | 235 | print "test_log_size=".$test_log_size."<br>"; |
237 | 236 | print "log_size1=".$log_size1."<br>"; |
@@ -367,7 +366,7 @@ discard block |
||
367 | 366 | $err="Your test job <strong>failed</strong> |
368 | 367 | <br>Please refer to the following Error Message:<br><p> |
369 | 368 | "; |
370 | - foreach($err_msgs as $line){ |
|
369 | + foreach($err_msgs as $line) { |
|
371 | 370 | $err=$err.$line."<br>"; |
372 | 371 | } |
373 | 372 | $err=$err." <p> |
@@ -380,9 +379,9 @@ discard block |
||
380 | 379 | $info->rsc_fpops_est = $est_cpu_time * 1.5e9; |
381 | 380 | $info->rsc_fpops_bound = $info->rsc_fpops_est * 20; |
382 | 381 | |
383 | - if ($disk==0){ |
|
382 | + if ($disk==0) { |
|
384 | 383 | $info->rsc_disk_bound=1000000; |
385 | - } else{ |
|
384 | + } else { |
|
386 | 385 | $info->rsc_disk_bound = $disk; |
387 | 386 | } |
388 | 387 | |
@@ -444,7 +443,7 @@ discard block |
||
444 | 443 | |
445 | 444 | $njobs=0; |
446 | 445 | $cmdlines = file($info->cmdline_file_path); |
447 | - foreach ($cmdlines as $cmdline){ |
|
446 | + foreach ($cmdlines as $cmdline) { |
|
448 | 447 | if (preg_match("/^\s*-var/", $cmdline)) { |
449 | 448 | $njobs++; |
450 | 449 | } |
@@ -460,7 +459,7 @@ discard block |
||
460 | 459 | |
461 | 460 | $i = 0; |
462 | 461 | foreach ($cmdlines as $cmdline) { |
463 | - if (preg_match("/^\s*-var/", $cmdline)){ |
|
462 | + if (preg_match("/^\s*-var/", $cmdline)) { |
|
464 | 463 | submit_job($app, $batch_id, $info, $cmdline, $i); |
465 | 464 | $i++; |
466 | 465 | } |
@@ -39,12 +39,12 @@ discard block |
||
39 | 39 | } |
40 | 40 | $format = get_str("format", true); |
41 | 41 | |
42 | -if ($format=="xml"){ |
|
42 | +if ($format=="xml") { |
|
43 | 43 | // don't do caching for XML |
44 | 44 | xml_header(); |
45 | 45 | $retval = db_init_xml(); |
46 | 46 | if ($retval) xml_error($retval); |
47 | - if ($auth){ |
|
47 | + if ($auth) { |
|
48 | 48 | $user = BoincUser::lookup_auth($auth); |
49 | 49 | $show_hosts = true; |
50 | 50 | } else { |
@@ -60,7 +60,7 @@ discard block |
||
60 | 60 | // |
61 | 61 | $cache_args="userid=".$id; |
62 | 62 | $cached_data = get_cached_data(USER_PAGE_TTL, $cache_args); |
63 | - if ($cached_data){ |
|
63 | + if ($cached_data) { |
|
64 | 64 | // We found some old but non-stale data, let's use it |
65 | 65 | $data = unserialize($cached_data); |
66 | 66 | $user = $data->user; |
@@ -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 |
@@ -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 | } |
@@ -45,14 +45,15 @@ |
||
45 | 45 | $posts = _mysql_query("select * from post where id>$start_id order by id"); |
46 | 46 | echo _mysql_error(); |
47 | 47 | $i=0; |
48 | - while ($post = _mysql_fetch_object($posts)){ |
|
48 | + while ($post = _mysql_fetch_object($posts)) { |
|
49 | 49 | $i++; |
50 | - if ($i%100 == 0) { //For every 100 posts |
|
50 | + if ($i%100 == 0) { |
|
51 | +//For every 100 posts |
|
51 | 52 | echo $post->id.". "; flush(); // print out where we are |
52 | 53 | //usleep(200000); |
53 | 54 | } |
54 | 55 | |
55 | - if ($post->id > $start_id){ |
|
56 | + if ($post->id > $start_id) { |
|
56 | 57 | fix_post($post); |
57 | 58 | } |
58 | 59 | } |