@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | } |
31 | 31 | |
32 | 32 | function show_forum_rss_item($thread, $userid, $threads_only, $no_images) { |
33 | - $unique_url=secure_url_base()."forum_thread.php?id=".$thread->id; |
|
33 | + $unique_url = secure_url_base()."forum_thread.php?id=".$thread->id; |
|
34 | 34 | |
35 | 35 | $clause2 = " and hidden=0 "; |
36 | 36 | if ($userid) $clause2 .= "and user=$userid"; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | } |
42 | 42 | if (!count($posts)) return; |
43 | 43 | $post = $posts[0]; |
44 | - $post_date = gmdate('D, d M Y H:i:s',$post->timestamp).' GMT'; |
|
44 | + $post_date = gmdate('D, d M Y H:i:s', $post->timestamp).' GMT'; |
|
45 | 45 | $post_user = BOincUser::lookup_id($post->user); |
46 | 46 | BoincForumPrefs::lookup($post_user); |
47 | 47 | $options = new output_options(); |
@@ -84,25 +84,25 @@ discard block |
||
84 | 84 | |
85 | 85 | // Now construct header |
86 | 86 | // |
87 | - header ("Expires: " . gmdate('D, d M Y H:i:s', time()+86400) . " GMT"); |
|
87 | + header("Expires: ".gmdate('D, d M Y H:i:s', time() + 86400)." GMT"); |
|
88 | 88 | if (sizeof($threads)) { |
89 | 89 | $t = $threads[0]; |
90 | - $last_mod_time = $threads_only?$t->create_time:$t->timestamp; |
|
91 | - $create_date = gmdate('D, d M Y H:i:s', $last_mod_time) . ' GMT'; |
|
92 | - header ("Last-Modified: " . $create_date); |
|
90 | + $last_mod_time = $threads_only ? $t->create_time : $t->timestamp; |
|
91 | + $create_date = gmdate('D, d M Y H:i:s', $last_mod_time).' GMT'; |
|
92 | + header("Last-Modified: ".$create_date); |
|
93 | 93 | } else { |
94 | - $create_date = gmdate('D, d M Y H:i:s') . ' GMT'; |
|
94 | + $create_date = gmdate('D, d M Y H:i:s').' GMT'; |
|
95 | 95 | } |
96 | - header ("Content-Type: application/xml"); |
|
96 | + header("Content-Type: application/xml"); |
|
97 | 97 | |
98 | - $forum=BoincForum::lookup_id($forumid); |
|
98 | + $forum = BoincForum::lookup_id($forumid); |
|
99 | 99 | // Create channel header and open XML content |
100 | 100 | // |
101 | 101 | $description = PROJECT.": $forum->title"; |
102 | 102 | if ($userid) { |
103 | 103 | $description .= " (posts by $user->name)"; |
104 | 104 | } |
105 | - $channel_image = secure_url_base() . "rss_image.gif"; |
|
105 | + $channel_image = secure_url_base()."rss_image.gif"; |
|
106 | 106 | $language = "en-us"; |
107 | 107 | echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?> |
108 | 108 | <rss version=\"2.0\"> |
@@ -257,7 +257,7 @@ discard block |
||
257 | 257 | "Zimbabwe" |
258 | 258 | ); |
259 | 259 | |
260 | -$country_to_iso3166_2 = array ( |
|
260 | +$country_to_iso3166_2 = array( |
|
261 | 261 | "Afghanistan" => "af", |
262 | 262 | "Albania" => "al", |
263 | 263 | "Algeria" => "dz", |
@@ -493,25 +493,25 @@ discard block |
||
493 | 493 | |
494 | 494 | // return a list of country options for a <select> |
495 | 495 | // |
496 | -function country_select_options($selected_country="None") { |
|
496 | +function country_select_options($selected_country = "None") { |
|
497 | 497 | global $countries; |
498 | 498 | |
499 | 499 | require_once("../inc/geoip.inc"); |
500 | 500 | |
501 | 501 | // See if we can find the user's country and select it as default: |
502 | 502 | // |
503 | - $gi = geoip_open("../inc/GeoIP.dat",GEOIP_STANDARD); |
|
504 | - $geoip_country = geoip_country_name_by_addr($gi,$_SERVER["REMOTE_ADDR"]); |
|
503 | + $gi = geoip_open("../inc/GeoIP.dat", GEOIP_STANDARD); |
|
504 | + $geoip_country = geoip_country_name_by_addr($gi, $_SERVER["REMOTE_ADDR"]); |
|
505 | 505 | geoip_close($gi); |
506 | 506 | |
507 | - if ($selected_country=="") $selected_country="None"; |
|
508 | - if ($selected_country=="None" and $geoip_country!=""){ |
|
509 | - $selected_country=$geoip_country; |
|
507 | + if ($selected_country == "") $selected_country = "None"; |
|
508 | + if ($selected_country == "None" and $geoip_country != "") { |
|
509 | + $selected_country = $geoip_country; |
|
510 | 510 | } |
511 | 511 | |
512 | 512 | $x = ""; |
513 | 513 | foreach ($countries as $country) { |
514 | - $selected = ($selected_country == $country ? "selected":""); |
|
514 | + $selected = ($selected_country == $country ? "selected" : ""); |
|
515 | 515 | $x .= "<option value=\"$country\" $selected>$country</option>\n"; |
516 | 516 | } |
517 | 517 | return $x; |
@@ -108,7 +108,7 @@ discard block |
||
108 | 108 | new NUM_SPEC(tra("% of the CPUs"), 1, 100, 0) |
109 | 109 | ), |
110 | 110 | new PREF_NUM( |
111 | - tra("Use at most") ."<br><font size=-2>Requires BOINC 7.20.3+</font>", |
|
111 | + tra("Use at most")."<br><font size=-2>Requires BOINC 7.20.3+</font>", |
|
112 | 112 | // xgettext:no-php-format |
113 | 113 | tra("Suspend/resume computing every few seconds to reduce CPU temperature and energy usage. Example: 75% means compute for 3 seconds, wait for 1 second, and repeat."), |
114 | 114 | "niu_cpu_usage_limit", |
@@ -295,9 +295,9 @@ discard block |
||
295 | 295 | $dp->disk_max_used_pct = parse_config($config, "<default_disk_max_used_pct>"); |
296 | 296 | $dp->disk_min_free_gb = parse_config($config, "<default_disk_min_free_gb>"); |
297 | 297 | // set some defaults if not found |
298 | - if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0; // no limit |
|
298 | + if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0; // no limit |
|
299 | 299 | if (!$dp->disk_max_used_pct) $dp->disk_max_used_pct = 90; // 90 percent |
300 | - if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1; // 1 GB |
|
300 | + if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1; // 1 GB |
|
301 | 301 | // set mininimum free space scheduler allows |
302 | 302 | // - depends on which scheduler is running |
303 | 303 | $dp->new_sched_flag = 1; |
@@ -323,7 +323,7 @@ discard block |
||
323 | 323 | global $text; |
324 | 324 | global $venue_name; |
325 | 325 | |
326 | - switch($name) { |
|
326 | + switch ($name) { |
|
327 | 327 | case "venue": |
328 | 328 | if (array_key_exists("name", $attrs)) { |
329 | 329 | $venue_name = $attrs["name"]; |
@@ -373,7 +373,7 @@ discard block |
||
373 | 373 | return; |
374 | 374 | } |
375 | 375 | } |
376 | - switch($name) { |
|
376 | + switch ($name) { |
|
377 | 377 | case "venue": |
378 | 378 | $top_parse_result->$venue_name = $parse_result; |
379 | 379 | $parse_result = $top_parse_result; |
@@ -547,7 +547,7 @@ discard block |
||
547 | 547 | } |
548 | 548 | } |
549 | 549 | |
550 | -function print_prefs_display_global($user, $columns=false) { |
|
550 | +function print_prefs_display_global($user, $columns = false) { |
|
551 | 551 | $global_prefs = prefs_parse_global($user->global_prefs); |
552 | 552 | |
553 | 553 | echo tra("These settings apply to all computers using this account except") |
@@ -557,7 +557,7 @@ discard block |
||
557 | 557 | .tra("Android devices") |
558 | 558 | ."</ul> |
559 | 559 | "; |
560 | - $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=". (int)!$columns .">".tra("(Switch view)")."</a></font>"; |
|
560 | + $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=".(int)!$columns.">".tra("(Switch view)")."</a></font>"; |
|
561 | 561 | if ($columns) { |
562 | 562 | echo "<h3>".tra("Combined preferences").$switch_link."</h3>"; |
563 | 563 | start_table(); |
@@ -594,9 +594,9 @@ discard block |
||
594 | 594 | // otherwise false |
595 | 595 | // |
596 | 596 | function print_prefs_form( |
597 | - $action, $subset, $venue, $user, $prefs, $cols, $error=false, |
|
598 | - $project_error=false |
|
599 | -){ |
|
597 | + $action, $subset, $venue, $user, $prefs, $cols, $error = false, |
|
598 | + $project_error = false |
|
599 | +) { |
|
600 | 600 | if ($action == "add") { |
601 | 601 | $script = "add_venue.php"; |
602 | 602 | $submit_value = tra("Add preferences"); |
@@ -636,7 +636,7 @@ discard block |
||
636 | 636 | // |
637 | 637 | // Functions to display preference subsets as forms |
638 | 638 | // |
639 | -function prefs_form_global($user, $prefs, $error=false) { |
|
639 | +function prefs_form_global($user, $prefs, $error = false) { |
|
640 | 640 | global $in_use_prefs; |
641 | 641 | global $not_in_use_prefs; |
642 | 642 | global $job_prefs; |
@@ -673,9 +673,9 @@ discard block |
||
673 | 673 | // |
674 | 674 | function prefs_form_radio_buttons($name, $yesno) { |
675 | 675 | $rb = tra("yes")." <input type=radio name=$name value=yes " |
676 | - .($yesno?"checked":"") |
|
676 | + .($yesno ? "checked" : "") |
|
677 | 677 | ."> ".tra("no")." <input type=radio name=$name value=no " |
678 | - .($yesno?"":"checked") |
|
678 | + .($yesno ? "" : "checked") |
|
679 | 679 | .">\n"; |
680 | 680 | return $rb; |
681 | 681 | } |
@@ -694,12 +694,12 @@ discard block |
||
694 | 694 | } |
695 | 695 | function venue_show($user) { |
696 | 696 | $venue = $user->venue; |
697 | - if ($venue =='') $venue = '---'; |
|
697 | + if ($venue == '') $venue = '---'; |
|
698 | 698 | tooltip_row2(VENUE_TOOLTIP, VENUE_DESC, $venue); |
699 | 699 | } |
700 | 700 | |
701 | 701 | function venue_form($user) { |
702 | - $n=$h=$w=$s=$m=''; |
|
702 | + $n = $h = $w = $s = $m = ''; |
|
703 | 703 | if ($user->venue == '') $n = 'selected'; |
704 | 704 | if ($user->venue == 'home') $h = 'selected'; |
705 | 705 | if ($user->venue == 'work') $w = 'selected'; |
@@ -757,7 +757,7 @@ discard block |
||
757 | 757 | // |
758 | 758 | // convert prefs from structure to XML |
759 | 759 | // |
760 | -function global_prefs_make_xml($prefs, $primary=true) { |
|
760 | +function global_prefs_make_xml($prefs, $primary = true) { |
|
761 | 761 | global $in_use_prefs; |
762 | 762 | global $not_in_use_prefs; |
763 | 763 | global $job_prefs; |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | db_init(); |
27 | 27 | |
28 | 28 | function current_tally($voteid) { |
29 | - $query="select sum(yes) as ayes,count(id)-sum(yes) as nays from banishment_votes where voteid=".$voteid; |
|
29 | + $query = "select sum(yes) as ayes,count(id)-sum(yes) as nays from banishment_votes where voteid=".$voteid; |
|
30 | 30 | $result = _mysql_query($query); |
31 | 31 | $foobar = _mysql_fetch_object($result); |
32 | 32 | echo "<b>Current Tally</b> Ayes: ".$foobar->ayes." Nays: ".$foobar->nays."<p>"; |
@@ -35,8 +35,8 @@ discard block |
||
35 | 35 | |
36 | 36 | function vote_is_in_progress($userid) { |
37 | 37 | // check whether a vote is already ongoing |
38 | - $now=time(); |
|
39 | - $query="select count(id) as count from banishment_vote where userid=".$userid." and end_time>".$now; |
|
38 | + $now = time(); |
|
39 | + $query = "select count(id) as count from banishment_vote where userid=".$userid." and end_time>".$now; |
|
40 | 40 | $result = _mysql_query($query); |
41 | 41 | if (!$result) { |
42 | 42 | echo "Database error attempting to read banishment_vote table 1.<p>"; |
@@ -51,56 +51,56 @@ discard block |
||
51 | 51 | return $foobar->count; |
52 | 52 | } |
53 | 53 | |
54 | -function start_vote($config,$logged_in_user,$user,$category,$reason) { |
|
55 | - $now=time(); |
|
56 | - $fin=$now+21600; |
|
54 | +function start_vote($config, $logged_in_user, $user, $category, $reason) { |
|
55 | + $now = time(); |
|
56 | + $fin = $now + 21600; |
|
57 | 57 | |
58 | 58 | |
59 | - if ( vote_is_in_progress($user->id) !=0 ) { |
|
59 | + if (vote_is_in_progress($user->id) != 0) { |
|
60 | 60 | echo "A banishment vote is already underway for this user.<p>"; |
61 | 61 | return 0; |
62 | 62 | } |
63 | - $query="insert into banishment_vote (userid,modid,start_time,end_time) values (".$user->id.",".$logged_in_user->id.",".$now.",".$fin.")"; |
|
63 | + $query = "insert into banishment_vote (userid,modid,start_time,end_time) values (".$user->id.",".$logged_in_user->id.",".$now.",".$fin.")"; |
|
64 | 64 | $result = _mysql_query($query); |
65 | 65 | if (!$result) { |
66 | 66 | echo "Database error attempting to insert to banishment_vote table.<p>"; |
67 | 67 | return 0; |
68 | 68 | } |
69 | 69 | |
70 | - $voteid=_mysql_insert_id(); |
|
71 | - $query="insert into banishment_votes (voteid,modid,time,yes) values (". $voteid .",". $logged_in_user->id .",". $now .",1)"; |
|
70 | + $voteid = _mysql_insert_id(); |
|
71 | + $query = "insert into banishment_votes (voteid,modid,time,yes) values (".$voteid.",".$logged_in_user->id.",".$now.",1)"; |
|
72 | 72 | $result = _mysql_query($query); |
73 | 73 | if (!$result) { |
74 | 74 | echo "Database error attempting to insert to banishment_votes table.<p>"; |
75 | 75 | return 0; |
76 | 76 | } |
77 | 77 | |
78 | - $query="update forum_preferences set banished_until=".$fin." where userid=".$user->id; |
|
78 | + $query = "update forum_preferences set banished_until=".$fin." where userid=".$user->id; |
|
79 | 79 | $result = _mysql_query($query); |
80 | 80 | |
81 | 81 | echo "Banishment vote started.<p><p>"; |
82 | 82 | current_tally($voteid); |
83 | - return send_banish_vote_email($user, 86400*14, $reason, $now+21600); |
|
83 | + return send_banish_vote_email($user, 86400*14, $reason, $now + 21600); |
|
84 | 84 | } |
85 | 85 | |
86 | -function vote_yes($config,$logged_in_user,$user) { |
|
87 | - $now=time(); |
|
86 | +function vote_yes($config, $logged_in_user, $user) { |
|
87 | + $now = time(); |
|
88 | 88 | // Check that a vote is underway. |
89 | - if (vote_is_in_progress($user->id)<1) { |
|
89 | + if (vote_is_in_progress($user->id) < 1) { |
|
90 | 90 | echo "No banishment vote is underway for this user.<p><p>"; |
91 | 91 | return 0; |
92 | 92 | } |
93 | 93 | // Find the voteid |
94 | - $query="select id as voteid from banishment_vote where userid=".$user->id." and end_time>".$now; |
|
94 | + $query = "select id as voteid from banishment_vote where userid=".$user->id." and end_time>".$now; |
|
95 | 95 | $result = _mysql_query($query); |
96 | 96 | $foobar = _mysql_fetch_object($result); |
97 | 97 | if (!$foobar) { |
98 | 98 | echo "Database error attempting to read banishment_vote table.<p>"; |
99 | 99 | return 0; |
100 | 100 | } |
101 | - $voteid=$foobar->voteid; |
|
101 | + $voteid = $foobar->voteid; |
|
102 | 102 | // Check whether mod has voted already. |
103 | - $query="select count(id) as count from banishment_votes where voteid=".$voteid." and modid=".$logged_in_user->id; |
|
103 | + $query = "select count(id) as count from banishment_votes where voteid=".$voteid." and modid=".$logged_in_user->id; |
|
104 | 104 | $result = _mysql_query($query); |
105 | 105 | $foobar = _mysql_fetch_object($result); |
106 | 106 | if (!$foobar) { |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | return 0; |
114 | 114 | } |
115 | 115 | // insert the vote |
116 | - $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->id .",". $now .",1)"; |
|
116 | + $query = "insert into banishment_votes (voteid,modid,time,yes) values (".$voteid.",".$logged_in_user->id.",".$now.",1)"; |
|
117 | 117 | $result = _mysql_query($query); |
118 | 118 | if (!$result) { |
119 | 119 | echo "Database error attempting to insert to banishment_votes table.<p>"; |
@@ -124,24 +124,24 @@ discard block |
||
124 | 124 | return 1; |
125 | 125 | } |
126 | 126 | |
127 | -function vote_no($config,$logged_in_user,$user) { |
|
127 | +function vote_no($config, $logged_in_user, $user) { |
|
128 | 128 | // Check that a vote is underway. |
129 | - $now=time(); |
|
130 | - if (vote_is_in_progress($user->id)<1) { |
|
129 | + $now = time(); |
|
130 | + if (vote_is_in_progress($user->id) < 1) { |
|
131 | 131 | echo "No banishment vote is underway for this user.<p>"; |
132 | 132 | return 0; |
133 | 133 | } |
134 | 134 | // Find the voteid |
135 | - $query="select id as voteid from banishment_vote where userid=".$user->id." and end_time>".$now; |
|
135 | + $query = "select id as voteid from banishment_vote where userid=".$user->id." and end_time>".$now; |
|
136 | 136 | $result = _mysql_query($query); |
137 | 137 | $foobar = _mysql_fetch_object($result); |
138 | 138 | if (!$foobar) { |
139 | 139 | echo "Database error attempting to read banishment_vote table.<p>"; |
140 | 140 | return 0; |
141 | 141 | } |
142 | - $voteid=$foobar->voteid; |
|
142 | + $voteid = $foobar->voteid; |
|
143 | 143 | // Check whether mod has voted already. |
144 | - $query="select count(id) as count from banishment_votes where voteid=".$voteid ." and modid=".$logged_in_user->id; |
|
144 | + $query = "select count(id) as count from banishment_votes where voteid=".$voteid." and modid=".$logged_in_user->id; |
|
145 | 145 | $result = _mysql_query($query); |
146 | 146 | $foobar = _mysql_fetch_object($result); |
147 | 147 | if (!$foobar) { |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | return 0; |
155 | 155 | } |
156 | 156 | // insert the vote |
157 | - $query="insert into banishment_votes (voteid,modid,time,yes) values (" . $voteid .",". $logged_in_user->id .",". $now .",0)"; |
|
157 | + $query = "insert into banishment_votes (voteid,modid,time,yes) values (".$voteid.",".$logged_in_user->id.",".$now.",0)"; |
|
158 | 158 | $result = _mysql_query($query); |
159 | 159 | if (!$result) { |
160 | 160 | echo "Database error attempting to insert to banishment_votes table.<p>"; |
@@ -25,17 +25,17 @@ |
||
25 | 25 | page_head(tra("Download BOINC add-on software")); |
26 | 26 | echo " |
27 | 27 | <p>" . |
28 | - tra("You can download applications in several categories.") ." |
|
28 | + tra("You can download applications in several categories.")." |
|
29 | 29 | <ul> |
30 | 30 | <li>". |
31 | - tra("These applications are not endorsed by %1 and you use them at your own risk.", PROJECT) ." |
|
31 | + tra("These applications are not endorsed by %1 and you use them at your own risk.", PROJECT)." |
|
32 | 32 | <li>" . |
33 | 33 | tra("We do not provide instructions for installing these applications. |
34 | 34 | However, the author may have provided some help on installing or uninstalling the application. |
35 | 35 | If this is not enough you should contact the author."). |
36 | 36 | tra("Instructions for installing and running BOINC are %1 here %2.", "<a href=https://boinc.berkeley.edu/download.php>", "</a>") |
37 | - . "<li>" . |
|
38 | - tra("This list is managed centrally at %1 the BOINC website %2.", "<a href=\"https://boinc.berkeley.edu/addons.php\">", "</a>") ." |
|
37 | + . "<li>". |
|
38 | + tra("This list is managed centrally at %1 the BOINC website %2.", "<a href=\"https://boinc.berkeley.edu/addons.php\">", "</a>")." |
|
39 | 39 | </ul> |
40 | 40 | "; |
41 | 41 |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | // where team includes a field "refcnt". |
32 | 32 | // |
33 | 33 | function merge_lists($list1, &$list2, $weight) { |
34 | - foreach($list1 as $team) { |
|
34 | + foreach ($list1 as $team) { |
|
35 | 35 | $id = $team->id; |
36 | 36 | if (array_key_exists($id, $list2)) { |
37 | 37 | $list2[$id]->refcnt += $weight; |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | if (defined("SHOW_NONVALIDATED_TEAMS")) { |
98 | 98 | $user = BoincUser::lookup_id($team->userid); |
99 | 99 | echo "<td>"; |
100 | - echo $user->email_validated?"Yes":"No"; |
|
100 | + echo $user->email_validated ? "Yes" : "No"; |
|
101 | 101 | echo "</td>\n"; |
102 | 102 | } |
103 | 103 | echo " |
@@ -137,7 +137,7 @@ discard block |
||
137 | 137 | xml_header(); |
138 | 138 | echo "<teams>\n"; |
139 | 139 | sort_list($list); |
140 | - foreach($list as $team) { |
|
140 | + foreach ($list as $team) { |
|
141 | 141 | show_team_xml($team); |
142 | 142 | } |
143 | 143 | echo "</teams>\n"; |
@@ -164,14 +164,14 @@ discard block |
||
164 | 164 | merge_lists($list2, $list, 3); |
165 | 165 | $tried = true; |
166 | 166 | } |
167 | - if (strlen($params->country) && $params->country!='None') { |
|
167 | + if (strlen($params->country) && $params->country != 'None') { |
|
168 | 168 | $country = BoincDb::escape_string($params->country); |
169 | 169 | $list2 = get_teams("country = '$country'", $params->active); |
170 | 170 | //echo "<br>country matches: ",sizeof($list2); |
171 | 171 | merge_lists($list2, $list, 1); |
172 | 172 | $tried = true; |
173 | 173 | } |
174 | - if ($params->type and $params->type>1) { |
|
174 | + if ($params->type and $params->type > 1) { |
|
175 | 175 | $list2 = get_teams("type=$params->type", $params->active); |
176 | 176 | //echo "<br>type matches: ",sizeof($list2); |
177 | 177 | merge_lists($list2, $list, 2); |
@@ -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 { |
@@ -39,7 +39,7 @@ |
||
39 | 39 | } else { |
40 | 40 | $last_mod_time = time(); |
41 | 41 | } |
42 | -$create_date = gmdate('D, d M Y H:i:s', $last_mod_time) . ' GMT'; |
|
42 | +$create_date = gmdate('D, d M Y H:i:s', $last_mod_time).' GMT'; |
|
43 | 43 | |
44 | 44 | header("Expires: ".gmdate('D, d M Y H:i:s', time())." GMT"); |
45 | 45 | header("Last-Modified: ".$create_date); |
@@ -42,15 +42,15 @@ |
||
42 | 42 | $start_id = 0; //Set this to something else if you like |
43 | 43 | $forum_preferencess = _mysql_query("select * from forum_preferences where userid>$start_id order by userid"); |
44 | 44 | echo _mysql_error(); |
45 | - $i=0; |
|
46 | - while ($forum_preferences = _mysql_fetch_object($forum_preferencess)){ |
|
45 | + $i = 0; |
|
46 | + while ($forum_preferences = _mysql_fetch_object($forum_preferencess)) { |
|
47 | 47 | $i++; |
48 | 48 | if ($i%100 == 0) { //For every 100 forum_preferencess |
49 | - echo $forum_preferences->userid.". "; flush(); // print out where we are |
|
49 | + echo $forum_preferences->userid.". "; flush(); // print out where we are |
|
50 | 50 | //usleep(200000); |
51 | 51 | } |
52 | 52 | |
53 | - if ($forum_preferences->userid > $start_id){ |
|
53 | + if ($forum_preferences->userid > $start_id) { |
|
54 | 54 | fix_forum_preferences($forum_preferences); |
55 | 55 | } |
56 | 56 | } |