Passed
Push — dpa_docker_wrapper12 ( e18bd7 )
by David
08:59
created
html/user/gpu_list.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 // $x->linux
61 61
 // $x->mac
62 62
 //
63
-function get_gpu_list($vendor, $alt_vendor=null) {
63
+function get_gpu_list($vendor, $alt_vendor = null) {
64 64
     $clause = "plan_class like '%$vendor%'";
65 65
     if ($alt_vendor) {
66 66
         $clause .= " or plan_class like '%$alt_vendor%'";
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     }
74 74
 
75 75
     $av_ids = "";
76
-    foreach($avs as $av) {
76
+    foreach ($avs as $av) {
77 77
         $av_ids .= "$av->id, ";
78 78
     }
79 79
     if ($vendor == "cuda") {
@@ -176,14 +176,14 @@  discard block
 block discarded – undo
176 176
         echo tra("No GPU tasks reported");
177 177
         return;
178 178
     }
179
-    $have_win = count($x->win)>0;
180
-    $have_mac = count($x->mac)>0;
181
-    $have_linux = count($x->linux)>0;
179
+    $have_win = count($x->win) > 0;
180
+    $have_mac = count($x->mac) > 0;
181
+    $have_linux = count($x->linux) > 0;
182 182
     $n = 0;
183 183
     if ($have_win) $n++;
184 184
     if ($have_mac) $n++;
185 185
     if ($have_linux) $n++;
186
-    $show_total = $n>1;
186
+    $show_total = $n > 1;
187 187
     start_table();
188 188
     echo "<tr>";
189 189
     if ($show_total) {
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -196,7 +196,7 @@
 block discarded – undo
196 196
 }
197 197
 
198 198
 $d = get_cached_data(86400);
199
-$data = FALSE;
199
+$data = false;
200 200
 if ($d) {
201 201
     $data = unserialize($d);
202 202
 }
Please login to merge, or discard this patch.
html/user/ffmail_action.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
 
28 28
 page_head(tra("Sending emails"));
29 29
 $found = false;
30
-for ($i=0; $i<6; $i++) {
30
+for ($i = 0; $i < 6; $i++) {
31 31
     $e = get_str("e$i", true);
32 32
     if (!$e) continue;
33 33
     $found = true;
Please login to merge, or discard this patch.
html/user/forum_report_post.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -44,21 +44,21 @@  discard block
 block discarded – undo
44 44
 // Using the same rules as for rating (at least for now)
45 45
 //
46 46
 
47
-if ($user->total_credit<$forum->rate_min_total_credit || $user->expavg_credit<$forum->rate_min_expavg_credit) {
47
+if ($user->total_credit < $forum->rate_min_total_credit || $user->expavg_credit < $forum->rate_min_expavg_credit) {
48 48
     error_page(tra("You need more average or total credit to report a post."));
49 49
 }
50 50
 
51 51
 // Action part
52 52
 //
53
-$success_page=0;
54
-if (get_str("submit",true)){
53
+$success_page = 0;
54
+if (get_str("submit", true)) {
55 55
     check_tokens($user->authenticator);
56 56
     $reason = get_str("reason");
57
-    if (send_report_post_email($user, $forum, $thread, $post, $reason)){
58
-        $success_page=1;
57
+    if (send_report_post_email($user, $forum, $thread, $post, $reason)) {
58
+        $success_page = 1;
59 59
     } else {
60 60
         echo "send email failed";
61
-        $success_page=-1;
61
+        $success_page = -1;
62 62
     }
63 63
 }
64 64
 
@@ -66,13 +66,13 @@  discard block
 block discarded – undo
66 66
 
67 67
 // Display part
68 68
 //
69
-if ($success_page==1) {
69
+if ($success_page == 1) {
70 70
     page_head(tra("Report Registered"));
71 71
     echo tra("Your report has been recorded. Thanks for your input.")."<p>"
72 72
         .tra("A moderator will now look at your report and decide what will happen - this may take a little while, so please be patient");
73 73
 
74 74
     echo "<p><a href=\"forum_thread.php?id=$thread->id&postid=$post->id\">".tra("Return to thread")."</a>";
75
-} elseif ($success_page==0){
75
+} elseif ($success_page == 0) {
76 76
     page_head(tra("Report a forum post"));
77 77
     if (!$no_forum_rating) {
78 78
         echo "<p>".tra("Before reporting this post, consider using the +/- rating system instead. If enough users rate a post negatively it will eventually be hidden.<br />You can find the rating system at the bottom of the post.")."</p>
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     echo "</td></tr>";
101 101
     end_table();
102 102
     echo "</form>";
103
-} elseif ($success_page==-1) {
103
+} elseif ($success_page == -1) {
104 104
     page_head(tra("Report not registered"));
105 105
     echo "<p>".tra("Your report could not be recorded. Please wait a while and try again.")."</p>
106 106
         <p>".tra("If this is not a temporary error, please report it to the project developers.")."</p>
Please login to merge, or discard this patch.
Braces   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 // Action part
52 52
 //
53 53
 $success_page=0;
54
-if (get_str("submit",true)){
54
+if (get_str("submit",true)) {
55 55
     check_tokens($user->authenticator);
56 56
     $reason = get_str("reason");
57
-    if (send_report_post_email($user, $forum, $thread, $post, $reason)){
57
+    if (send_report_post_email($user, $forum, $thread, $post, $reason)) {
58 58
         $success_page=1;
59 59
     } else {
60 60
         echo "send email failed";
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
         .tra("A moderator will now look at your report and decide what will happen - this may take a little while, so please be patient");
73 73
 
74 74
     echo "<p><a href=\"forum_thread.php?id=$thread->id&postid=$post->id\">".tra("Return to thread")."</a>";
75
-} elseif ($success_page==0){
75
+} elseif ($success_page==0) {
76 76
     page_head(tra("Report a forum post"));
77 77
     if (!$no_forum_rating) {
78 78
         echo "<p>".tra("Before reporting this post, consider using the +/- rating system instead. If enough users rate a post negatively it will eventually be hidden.<br />You can find the rating system at the bottom of the post.")."</p>
Please login to merge, or discard this patch.
html/user/donations.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
         $acquired = $acquired - $required;
74 74
         $progress = 100;
75 75
     } else {
76
-        $progress = round($acquired / ($required) * 100);
77
-        $progress2 = round($acquired / ($required) * 100,1);
76
+        $progress = round($acquired/($required)*100);
77
+        $progress2 = round($acquired/($required)*100, 1);
78 78
     }
79 79
     
80 80
     $col2 = "<input style=\"float: left\" type=\"radio\" name=\"item_id\" value=\"".$row->id."\"";
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
     } elseif ($progress == 100) {
90 90
         $col2 .= "<div style=\"float: left; width: 300px; height: 18px; background-color: green; border: 1px solid #000000\">";
91 91
     } else {
92
-        $col2 .= "<div style=\"float: left; width: ".($progress*3 - 1)."px; height: 18px; background-color: green; border: 1px solid #000000;\" align=\"right\"><b>".$progress2."</b>%</div><div style=\"float: left; width: ".((100-$progress)*3 - 1)."px; height: 18px; background-color: red; border: 1px solid #000000;\">";
92
+        $col2 .= "<div style=\"float: left; width: ".($progress*3 - 1)."px; height: 18px; background-color: green; border: 1px solid #000000;\" align=\"right\"><b>".$progress2."</b>%</div><div style=\"float: left; width: ".((100 - $progress)*3 - 1)."px; height: 18px; background-color: red; border: 1px solid #000000;\">";
93 93
     }
94 94
     
95 95
     row2($col1, $col2);
Please login to merge, or discard this patch.
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -98,50 +98,35 @@
 block discarded – undo
98 98
 $amount = "<select class=\"form-control\" name=\"from\" onchange=\"Cvalue();numberFormat();\" style=\"width: 200px;\">\n";
99 99
 if (DONATION_CURRENCY == "EUR") {
100 100
     $amount .= "<option value=\"51\">Euros</option>\n";
101
-}
102
-elseif (DONATION_CURRENCY == "CAD") {
101
+} elseif (DONATION_CURRENCY == "CAD") {
103 102
     $amount .= "<option value=\"30\">Canadian Dollars</option>\n";
104
-}
105
-elseif (DONATION_CURRENCY == "GBP") {
103
+} elseif (DONATION_CURRENCY == "GBP") {
106 104
     $amount .= "<option value=\"24\">Pounds Sterling</option>\n";
107
-}
108
-elseif (DONATION_CURRENCY == "USD") {
105
+} elseif (DONATION_CURRENCY == "USD") {
109 106
     $amount .= "<option value=\"3\">U.S. Dollars</option>\n";
110
-}
111
-elseif (DONATION_CURRENCY == "JPY") {
107
+} elseif (DONATION_CURRENCY == "JPY") {
112 108
     $amount .= "<option value=\"72\">Yen</option>\n";
113
-}
114
-elseif (DONATION_CURRENCY == "AUD") {
109
+} elseif (DONATION_CURRENCY == "AUD") {
115 110
     $amount .= "<option value=\"9\">Australian Dollars</option>\n";
116
-}
117
-elseif (DONATION_CURRENCY == "NZD") {
111
+} elseif (DONATION_CURRENCY == "NZD") {
118 112
     $amount .= "<option value=\"102\">New Zealand Dollars</option>\n";
119
-}
120
-elseif (DONATION_CURRENCY == "CHF") {
113
+} elseif (DONATION_CURRENCY == "CHF") {
121 114
     $amount .= "<option value=\"139\">Swiss Francs</option>\n";
122
-}
123
-elseif (DONATION_CURRENCY == "HKD") {
115
+} elseif (DONATION_CURRENCY == "HKD") {
124 116
     $amount .= "<option value=\"63\">Hong Kong Dollars</option>\n";
125
-}
126
-elseif (DONATION_CURRENCY == "SGD") {
117
+} elseif (DONATION_CURRENCY == "SGD") {
127 118
     $amount .= "<option value=\"126\">Singapore Dollars</option>\n";
128
-}
129
-elseif (DONATION_CURRENCY == "SEK") {
119
+} elseif (DONATION_CURRENCY == "SEK") {
130 120
     $amount .= "<option value=\"138\">Swedish Kronor</option>\n";
131
-}
132
-elseif (DONATION_CURRENCY == "DKK") {
121
+} elseif (DONATION_CURRENCY == "DKK") {
133 122
     $amount .= "<option value=\"42\">Danish Kroner</option>\n";
134
-}
135
-elseif (DONATION_CURRENCY == "PLN") {
123
+} elseif (DONATION_CURRENCY == "PLN") {
136 124
     $amount .= "<option value=\"114\">Polish Zloty</option>\n";
137
-}
138
-elseif (DONATION_CURRENCY == "NOK") {
125
+} elseif (DONATION_CURRENCY == "NOK") {
139 126
     $amount .= "<option value=\"106\">Norwegian Kroner</option>\n";
140
-}
141
-elseif (DONATION_CURRENCY == "HUF") {
127
+} elseif (DONATION_CURRENCY == "HUF") {
142 128
     $amount .= "<option value=\"64\">Hungarian Forint</option>\n";
143
-}
144
-elseif (DONATION_CURRENCY == "CZK") {
129
+} elseif (DONATION_CURRENCY == "CZK") {
145 130
     $amount .= "<option value=\"41\">Czech Koruna</option>\n";
146 131
 }
147 132
 $amount .= "</select>\n";
Please login to merge, or discard this patch.
html/user/userw.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,8 +22,8 @@  discard block
 block discarded – undo
22 22
 check_get_args(array("id"));
23 23
 
24 24
 function show_credit_wap($user) {
25
-    $retstr = "<br/>User TotCred: " . format_credit($user->total_credit) . "<br/>";
26
-    $retstr .= "User AvgCred: " . format_credit($user->expavg_credit) . "<br/>";
25
+    $retstr = "<br/>User TotCred: ".format_credit($user->total_credit)."<br/>";
26
+    $retstr .= "User AvgCred: ".format_credit($user->expavg_credit)."<br/>";
27 27
     return $retstr;
28 28
 }
29 29
 
@@ -45,8 +45,8 @@  discard block
 block discarded – undo
45 45
     $wapstr .= show_credit_wap($user);
46 46
     if ($user->teamid && $team) {
47 47
         $wapstr .= "<br/>".tra("Team:")." ".$team->name."<br/>";
48
-        $wapstr .= tra("Team TotCred:")." " . format_credit($team->total_credit) . "<br/>";
49
-        $wapstr .= tra("Team AvgCred:")." " . format_credit($team->expavg_credit) . "<br/>";
48
+        $wapstr .= tra("Team TotCred:")." ".format_credit($team->total_credit)."<br/>";
49
+        $wapstr .= tra("Team AvgCred:")." ".format_credit($team->expavg_credit)."<br/>";
50 50
     } else {
51 51
         $wapstr .= "<br/>".tra("Team: None")."<br/>";
52 52
     }
Please login to merge, or discard this patch.
html/user/ffmail_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 
52 52
 start_table();
53 53
 row2("From:", "$user->name &lt;$user->email_addr>");
54
-for ($i=0; $i<6; $i++) {
54
+for ($i = 0; $i < 6; $i++) {
55 55
     row2(tra("To:"), "<input size=30 name=e$i>");
56 56
 }
57 57
 row2(tra("Subject"), "<input size=80 name=subject value=\"$subject\">");
Please login to merge, or discard this patch.
html/user/view_profile.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
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 {
Please login to merge, or discard this patch.
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.