Passed
Push — dpa_sched ( 829960 )
by David
10:37
created
html/user/team_delta.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
html/user/team_lookup.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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>
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -52,7 +52,8 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
html/user/forum_banishment_vote.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,13 +47,13 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
html/user/donation_ipn.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
69 69
             }
70 70
         }
71 71
     }
72
-    fclose ($fp);
72
+    fclose($fp);
73 73
 }
74 74
 
75 75
 ?>
Please login to merge, or discard this patch.
html/user/set_language.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
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);
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
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');
Please login to merge, or discard this patch.
html/user/results.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,11 +37,11 @@  discard block
 block discarded – undo
37 37
 $userid = get_int("userid", true);
38 38
 $offset = get_int("offset", true);
39 39
 $appid = get_int("appid", true);
40
-if (!$offset) $offset=0;
40
+if (!$offset) $offset = 0;
41 41
 $state = get_int("state", true);
42
-if (!$state) $state=0;
42
+if (!$state) $state = 0;
43 43
 $show_names = get_int("show_names", true);
44
-if (!$show_names) $show_names=0;
44
+if (!$show_names) $show_names = 0;
45 45
 
46 46
 $s = $state_name[$state];
47 47
 if ($appid) {
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
     $clause = "hostid=$hostid";
58 58
     page_head(tra("$s tasks for computer %1", $host->id));
59 59
     $show_host_link = false;
60
-} else if ($userid){
60
+} else if ($userid) {
61 61
     $user = get_logged_in_user();
62 62
     if ($userid != $user->id) {
63 63
         error_page(tra("No access"));
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
     error_page(tra("Missing user ID or host ID"));
70 70
 }
71 71
 
72
-$clause2 = $clause. $state_clause[$state];
72
+$clause2 = $clause.$state_clause[$state];
73 73
 if ($appid) {
74 74
     $clause2 .= ' AND appid='.$appid;
75 75
 }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 } else {
80 80
     $order_clause = "order by sent_time desc";
81 81
 }
82
-$query = "$clause2 $order_clause limit $offset,".($results_per_page+1);
82
+$query = "$clause2 $order_clause limit $offset,".($results_per_page + 1);
83 83
 $results = BoincResult::enum($query);
84 84
 
85 85
 $info = new StdClass;
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@
 block discarded – undo
57 57
     $clause = "hostid=$hostid";
58 58
     page_head(tra("$s tasks for computer %1", $host->id));
59 59
     $show_host_link = false;
60
-} else if ($userid){
60
+} else if ($userid) {
61 61
     $user = get_logged_in_user();
62 62
     if ($userid != $user->id) {
63 63
         error_page(tra("No access"));
Please login to merge, or discard this patch.
html/user/manage_project.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -112,10 +112,10 @@  discard block
 block discarded – undo
112 112
     $apps = BoincApp::enum("deprecated=0");
113 113
     foreach ($apps as $app) {
114 114
         $us = BoincUserSubmitApp::lookup("user_id=$user_id and app_id=$app->id");
115
-        $checked = $us?"checked":"";
115
+        $checked = $us ? "checked" : "";
116 116
         echo "<br>&nbsp;&nbsp;&nbsp; <input type=checkbox name=app_$app->id $checked> $app->name\n";
117 117
     }
118
-    $q = (string) $usub->quota;
118
+    $q = (string)$usub->quota;
119 119
     $mj = $usub->max_jobs_in_progress;
120 120
     echo "
121 121
         <p>
@@ -151,11 +151,11 @@  discard block
 block discarded – undo
151 151
             }
152 152
         }
153 153
     }
154
-    $quota = (double) get_str('quota');
154
+    $quota = (double)get_str('quota');
155 155
     if ($quota != $us->quota) {
156 156
         $us->update("quota=$quota");
157 157
     }
158
-    $mj = (int) get_str('max_jobs_in_progress');
158
+    $mj = (int)get_str('max_jobs_in_progress');
159 159
     if ($mj != $us->max_jobs_in_progress) {
160 160
         $us->update("max_jobs_in_progress=$mj");
161 161
     }
Please login to merge, or discard this patch.
html/user/forum_get_data.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,7 @@
 block discarded – undo
82 82
     echo "<rpc_response>\n";
83 83
     echo "<count>$count</count>\n";
84 84
     echo "<threads>\n";
85
-    foreach($threads as $thread) {
85
+    foreach ($threads as $thread) {
86 86
         echo "<thread>\n";
87 87
         echo "    <id>$thread->id</id>\n";
88 88
         echo "    <forumid>$thread->forum</forumid>\n";
Please login to merge, or discard this patch.
html/user/forum_banishment_vote_action.php 4 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40 40
     if (!get_str('action', true)){
41
-	    error_page(tra("You must specify an action..."));
41
+        error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
44 44
     }
Please login to merge, or discard this patch.
Switch Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -55,14 +55,14 @@
 block discarded – undo
55 55
 
56 56
 // TODO: create a function for this in forum_banishment_vote.inc to make it more flexible
57 57
 switch (post_int("category", true)) {
58
-    case 1:
59
-        $mod_category = tra("Obscene");
60
-    case 2:
61
-        $mod_category = tra("Flame/Hate mail");
62
-    case 3:
63
-        $mod_category = tra("User Request");
64
-    default:
65
-        $mod_category = tra("Other");
58
+case 1:
59
+    $mod_category = tra("Obscene");
60
+case 2:
61
+    $mod_category = tra("Flame/Hate mail");
62
+case 3:
63
+    $mod_category = tra("User Request");
64
+default:
65
+    $mod_category = tra("Other");
66 66
 }
67 67
 
68 68
 if (post_str('reason', true)){
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40
-    if (!get_str('action', true)){
40
+    if (!get_str('action', true)) {
41 41
 	    error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 $userid = post_int('userid');
50 50
 $user=BoincUser::lookup_id($userid);
51 51
 
52
-if ($action!="start"){
52
+if ($action!="start") {
53 53
     error_page("Unknown action");
54 54
 }
55 55
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
         $mod_category = tra("Other");
66 66
 }
67 67
 
68
-if (post_str('reason', true)){
68
+if (post_str('reason', true)) {
69 69
     start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason"));
70 70
 } else {
71 71
     start_vote($config,$logged_in_user,$user, $mod_category,"None given");
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 
38 38
 // See if "action" is provided - either through post or get
39 39
 if (!post_str('action', true)) {
40
-    if (!get_str('action', true)){
40
+    if (!get_str('action', true)) {
41 41
 	    error_page(tra("You must specify an action..."));
42 42
     } else {
43 43
         $action = get_str('action');
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
 }
48 48
 
49 49
 $userid = post_int('userid');
50
-$user=BoincUser::lookup_id($userid);
50
+$user = BoincUser::lookup_id($userid);
51 51
 
52
-if ($action!="start"){
52
+if ($action != "start") {
53 53
     error_page("Unknown action");
54 54
 }
55 55
 
@@ -65,10 +65,10 @@  discard block
 block discarded – undo
65 65
         $mod_category = tra("Other");
66 66
 }
67 67
 
68
-if (post_str('reason', true)){
69
-    start_vote($config,$logged_in_user,$user, $mod_category,post_str("reason"));
68
+if (post_str('reason', true)) {
69
+    start_vote($config, $logged_in_user, $user, $mod_category, post_str("reason"));
70 70
 } else {
71
-    start_vote($config,$logged_in_user,$user, $mod_category,"None given");
71
+    start_vote($config, $logged_in_user, $user, $mod_category, "None given");
72 72
 }
73 73
 
74 74
 ?>
Please login to merge, or discard this patch.