@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | show_forum_header($user); |
| 75 | 75 | |
| 76 | -if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){ |
|
| 76 | +if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) { |
|
| 77 | 77 | $categories = BoincCategory::enum("true order by orderID"); |
| 78 | 78 | } else { |
| 79 | 79 | echo "<p>" |
@@ -140,5 +140,5 @@ discard block |
||
| 140 | 140 | page_tail(); |
| 141 | 141 | BoincForumLogging::cleanup(); |
| 142 | 142 | |
| 143 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
| 143 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
| 144 | 144 | ?> |
@@ -73,7 +73,7 @@ |
||
| 73 | 73 | |
| 74 | 74 | show_forum_header($user); |
| 75 | 75 | |
| 76 | -if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE){ |
|
| 76 | +if (defined('FORUM_QA_MERGED_MODE') && FORUM_QA_MERGED_MODE) { |
|
| 77 | 77 | $categories = BoincCategory::enum("true order by orderID"); |
| 78 | 78 | } else { |
| 79 | 79 | echo "<p>" |
@@ -87,7 +87,7 @@ |
||
| 87 | 87 | if ($first) { |
| 88 | 88 | $first = false; |
| 89 | 89 | echo "<p>"; |
| 90 | - show_forum_title($category, NULL, NULL); |
|
| 90 | + show_forum_title($category, null, null); |
|
| 91 | 91 | echo "<p>"; |
| 92 | 92 | show_mark_as_read_button($user); |
| 93 | 93 | start_table('table-striped'); |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $cache_args = "userid=$userid"; |
| 46 | 46 | $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); |
| 47 | -if ($cacheddata){ |
|
| 47 | +if ($cacheddata) { |
|
| 48 | 48 | // Already got a cached version of the information |
| 49 | 49 | $community_links_object = unserialize($cacheddata); |
| 50 | 50 | } else { |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | $cache_args = "userid=$userid"; |
| 46 | 46 | $cacheddata = get_cached_data(USER_PROFILE_TTL, $cache_args); |
| 47 | -if ($cacheddata){ |
|
| 47 | +if ($cacheddata) { |
|
| 48 | 48 | // Already got a cached version of the information |
| 49 | 49 | $community_links_object = unserialize($cacheddata); |
| 50 | 50 | } else { |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | global $xml; |
| 31 | 31 | $user = BoincUser::lookup_id($delta->userid); |
| 32 | 32 | $when = time_str($delta->timestamp); |
| 33 | - $what = $delta->joining?"joined":"quit"; |
|
| 33 | + $what = $delta->joining ? "joined" : "quit"; |
|
| 34 | 34 | if ($xml) { |
| 35 | 35 | echo " <action> |
| 36 | 36 | <id>$user->id</id> |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | } else { |
| 44 | 44 | echo "<tr> |
| 45 | 45 | <td>$when</td> |
| 46 | - <td>",user_links($user, BADGE_HEIGHT_MEDIUM)," (ID $user->id)</td> |
|
| 46 | + <td>", user_links($user, BADGE_HEIGHT_MEDIUM), " (ID $user->id)</td> |
|
| 47 | 47 | <td>$what</td> |
| 48 | 48 | <td>$delta->total_credit</td> |
| 49 | 49 | </tr> |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | ); |
| 83 | 83 | } |
| 84 | 84 | $deltas = BoincTeamDelta::enum("teamid=$teamid order by timestamp"); |
| 85 | -foreach($deltas as $delta) { |
|
| 85 | +foreach ($deltas as $delta) { |
|
| 86 | 86 | show_delta($delta); |
| 87 | 87 | } |
| 88 | 88 | if ($xml) { |
@@ -34,10 +34,10 @@ |
||
| 34 | 34 | |
| 35 | 35 | $border = get_str("border", true); |
| 36 | 36 | |
| 37 | -if ($border=="no") { |
|
| 37 | +if ($border == "no") { |
|
| 38 | 38 | $border = 0; |
| 39 | 39 | } else { |
| 40 | - $border=8; |
|
| 40 | + $border = 8; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | $credit = credit_string($team->total_credit, false); |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | if ($format == 'xml') { |
| 77 | 77 | echo "<teams>\n"; |
| 78 | 78 | $total = 0; |
| 79 | - foreach($teams as $team) { |
|
| 79 | + foreach ($teams as $team) { |
|
| 80 | 80 | show_team_xml($team); |
| 81 | 81 | $total++; |
| 82 | 82 | if ($total == 100) break; |
@@ -91,13 +91,13 @@ discard block |
||
| 91 | 91 | echo "<p>"; |
| 92 | 92 | echo tra("You may view these teams' members, statistics, and information."); |
| 93 | 93 | echo "<ul>"; |
| 94 | - foreach($teams as $team) { |
|
| 94 | + foreach ($teams as $team) { |
|
| 95 | 95 | echo "<li>"; |
| 96 | 96 | echo "<a href=team_display.php?teamid=$team->id>"; |
| 97 | 97 | echo "$team->name</a></li>"; |
| 98 | 98 | } |
| 99 | 99 | echo "</ul>"; |
| 100 | - if (count($teams)==100) { |
|
| 100 | + if (count($teams) == 100) { |
|
| 101 | 101 | echo |
| 102 | 102 | tra("More than 100 teams match your search. The first 100 are shown.") |
| 103 | 103 | ."<br> |
@@ -52,7 +52,8 @@ |
||
| 52 | 52 | echo "<teams>\n"; |
| 53 | 53 | $total = 0; |
| 54 | 54 | foreach ($team_id_array as $team_id) { |
| 55 | - if (is_numeric($team_id)) { //make sure only numbers get through |
|
| 55 | + if (is_numeric($team_id)) { |
|
| 56 | +//make sure only numbers get through |
|
| 56 | 57 | $team = BoincTeam::lookup_id($team_id); |
| 57 | 58 | if ($team) { |
| 58 | 59 | show_team_xml($team); |
@@ -47,13 +47,13 @@ discard block |
||
| 47 | 47 | start_table(); |
| 48 | 48 | row1(tra("Banishment Vote")); |
| 49 | 49 | |
| 50 | -if (get_str('action')=="start") { |
|
| 50 | +if (get_str('action') == "start") { |
|
| 51 | 51 | if (!$user) { |
| 52 | 52 | error_page(tra("No user with this ID found.")); |
| 53 | 53 | } |
| 54 | 54 | BoincForumPrefs::lookup($user); |
| 55 | 55 | $x = $user->prefs->banished_until; |
| 56 | - if ($x>time()) { |
|
| 56 | + if ($x > time()) { |
|
| 57 | 57 | error_page(tra("User is already banished")); |
| 58 | 58 | } |
| 59 | 59 | //display input that selects reason |
@@ -77,10 +77,10 @@ discard block |
||
| 77 | 77 | "", |
| 78 | 78 | "<input class=\"btn btn-default\" type=\"submit\" name=\"submit\" value=\"".tra("Proceed with vote")."\">" |
| 79 | 79 | ); |
| 80 | -} elseif (get_str('action')=="yes") { |
|
| 81 | - vote_yes($config,$logged_in_user,$user); |
|
| 82 | -} elseif (get_str('action')=="no") { |
|
| 83 | - vote_no($config,$logged_in_user,$user); |
|
| 80 | +} elseif (get_str('action') == "yes") { |
|
| 81 | + vote_yes($config, $logged_in_user, $user); |
|
| 82 | +} elseif (get_str('action') == "no") { |
|
| 83 | + vote_no($config, $logged_in_user, $user); |
|
| 84 | 84 | } else { |
| 85 | 85 | error_page("Unknown action"); |
| 86 | 86 | } |
@@ -30,8 +30,8 @@ discard block |
||
| 30 | 30 | // post back to PayPal system to validate |
| 31 | 31 | $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; |
| 32 | 32 | $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; |
| 33 | -$header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; |
|
| 34 | -$fp = fsockopen ('www.paypal.com', 80, $errno, $errstr, 30); |
|
| 33 | +$header .= "Content-Length: ".strlen($req)."\r\n\r\n"; |
|
| 34 | +$fp = fsockopen('www.paypal.com', 80, $errno, $errstr, 30); |
|
| 35 | 35 | |
| 36 | 36 | // assign posted variables to local variables |
| 37 | 37 | $item_name = $_POST['item_name']; |
@@ -50,11 +50,11 @@ discard block |
||
| 50 | 50 | if (!$fp) { |
| 51 | 51 | // HTTP ERROR, might want to do additional handling here |
| 52 | 52 | } else { |
| 53 | - fputs ($fp, $header . $req); |
|
| 53 | + fputs($fp, $header.$req); |
|
| 54 | 54 | while (!feof($fp)) { |
| 55 | - $res = fgets ($fp, 1024); |
|
| 56 | - if (strcmp ($res, "VERIFIED") == 0) { |
|
| 57 | - $item_array = explode("_",$item_number); |
|
| 55 | + $res = fgets($fp, 1024); |
|
| 56 | + if (strcmp($res, "VERIFIED") == 0) { |
|
| 57 | + $item_array = explode("_", $item_number); |
|
| 58 | 58 | $payment_id = abs($item_array[0]); |
| 59 | 59 | $order_time = abs($item_array[1]); |
| 60 | 60 | $result = _mysql_query("SELECT * FROM donation_paypal WHERE order_time = '$order_time' AND id = '$payment_id' AND processed = '0'"); |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | } |
| 70 | 70 | } |
| 71 | 71 | } |
| 72 | - fclose ($fp); |
|
| 72 | + fclose($fp); |
|
| 73 | 73 | } |
| 74 | 74 | |
| 75 | 75 | ?> |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | array(tra("Subject"), tra("Sender and date"), tra("Message")), |
| 80 | 80 | array('style="width: 12em;"', 'style="width: 10em;"', "") |
| 81 | 81 | ); |
| 82 | - foreach($msgs as $msg) { |
|
| 82 | + foreach ($msgs as $msg) { |
|
| 83 | 83 | $sender = BoincUser::lookup_id($msg->senderid); |
| 84 | 84 | if (!$sender) { |
| 85 | 85 | $msg->delete(); |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | $msgs = BoincPrivateMessage::enum( |
| 311 | 311 | "userid=$logged_in_user->id" |
| 312 | 312 | ); |
| 313 | - foreach($msgs as $msg) { |
|
| 313 | + foreach ($msgs as $msg) { |
|
| 314 | 314 | $x = "pm_select_$msg->id"; |
| 315 | 315 | if (post_str($x, true)) { |
| 316 | 316 | $msg = BoincPrivateMessage::lookup_id($msg->id); |
@@ -365,5 +365,5 @@ discard block |
||
| 365 | 365 | error_page(tra("Unknown action")); |
| 366 | 366 | } |
| 367 | 367 | |
| 368 | -$cvs_version_tracker[]="\$Id: pm.php 14077 2007-11-03 04:26:47Z davea $"; |
|
| 368 | +$cvs_version_tracker[] = "\$Id: pm.php 14077 2007-11-03 04:26:47Z davea $"; |
|
| 369 | 369 | ?> |
@@ -234,7 +234,8 @@ discard block |
||
| 234 | 234 | |
| 235 | 235 | foreach ($users as $username) { |
| 236 | 236 | $user = explode(" ", $username); |
| 237 | - if (is_numeric($user[0])) { // user ID is given |
|
| 237 | + if (is_numeric($user[0])) { |
|
| 238 | +// user ID is given |
|
| 238 | 239 | $userid = $user[0]; |
| 239 | 240 | $user = BoincUser::lookup_id($userid); |
| 240 | 241 | if ($user == null) { |
@@ -244,7 +245,8 @@ discard block |
||
| 244 | 245 | $users = BoincUser::lookup_name($username); |
| 245 | 246 | if (count($users) == 0) { |
| 246 | 247 | pm_form($replyto, $userid, tra("Could not find user with username %1", $username)); |
| 247 | - } elseif (count($users) > 1) { // Non-unique username |
|
| 248 | + } elseif (count($users) > 1) { |
|
| 249 | +// Non-unique username |
|
| 248 | 250 | pm_form($replyto, $userid, tra("%1 is not a unique username; you will have to use user ID", $username)); |
| 249 | 251 | } |
| 250 | 252 | $user = $users[0]; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $languages = get_supported_languages(); |
| 23 | 23 | $lang = sanitize_tags(get_str("lang", true)); |
| 24 | 24 | |
| 25 | -if (!in_array($lang, $languages) && $lang!="auto" && $lang!="en") { |
|
| 25 | +if (!in_array($lang, $languages) && $lang != "auto" && $lang != "en") { |
|
| 26 | 26 | echo "Language $lang is not supported"; |
| 27 | 27 | } else { |
| 28 | 28 | send_cookie('lang', $lang, true); |
@@ -23,7 +23,7 @@ |
||
| 23 | 23 | $lang = sanitize_tags(get_str("lang", true)); |
| 24 | 24 | |
| 25 | 25 | if (!in_array($lang, $languages) && $lang!="auto" && $lang!="en") { |
| 26 | - echo "Language $lang is not supported"; |
|
| 26 | + echo "language $lang is not supported"; |
|
| 27 | 27 | } else { |
| 28 | 28 | send_cookie('lang', $lang, true); |
| 29 | 29 | header('Location: index.php'); |