Passed
Push — vko_msi_refactor ( 225587 )
by Vitalii
11:56
created
html/user/team_email_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     }
51 51
     echo "<users>\n";
52 52
     $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, expavg_time, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
53
-    foreach($users as $user) {
53
+    foreach ($users as $user) {
54 54
         show_team_member($user, $creditonly);
55 55
     }
56 56
     echo "</users>\n";
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 }
82 82
 
83 83
 $users = BoincUser::enum_fields("id, email_addr, send_email, name, total_credit, expavg_credit, has_profile, donated, country, cross_project_id, create_time, url", "teamid=$team->id");
84
-foreach($users as $user) {
84
+foreach ($users as $user) {
85 85
     if ($plain) {
86 86
         echo "$user->name $user->id\n";
87 87
     } else {
@@ -94,5 +94,5 @@  discard block
 block discarded – undo
94 94
     page_tail();
95 95
 }
96 96
 
97
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
97
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
98 98
 ?>
Please login to merge, or discard this patch.
html/user/brand_stats.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
     $n = 0;
46 46
     $t = 0;
47 47
     $a = 0;
48
-    foreach($hosts as $h) {
48
+    foreach ($hosts as $h) {
49 49
         $t += $h->total_credit;
50 50
         $a += $h->expavg_credit;
51 51
         if ($h->expavg_credit > .1) $n++;
Please login to merge, or discard this patch.
html/user/host_app_versions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
         if (!$show_dep && $app->deprecated) {
41 41
             return null;
42 42
         }
43
-        $rsc_type = $gavid % 1000000;
43
+        $rsc_type = $gavid%1000000;
44 44
         $r = rsc_name($rsc_type);
45 45
         return "$app->user_friendly_name (".tra("anonymous platform").", $r)";
46 46
     } else {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         }
61 61
         $platform = BoincPlatform::lookup_id($av->platformid);
62 62
         if (!$platform) return tra("Missing platform");
63
-        $pc = (strlen($av->plan_class))?"($av->plan_class)":"";
63
+        $pc = (strlen($av->plan_class)) ? "($av->plan_class)" : "";
64 64
         $v = number_format($av->version_num/100, 2);
65 65
         return "$app->user_friendly_name $v $platform->name $pc";
66 66
     }
Please login to merge, or discard this patch.
html/user/gpu_list.php 1 patch
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.
html/user/team_quit_form.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,5 +44,5 @@
 block discarded – undo
44 44
 ";
45 45
 page_tail();
46 46
 
47
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
47
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
48 48
 ?>
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 1 patch
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.
html/user/pending.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
     $sum = 0;
48 48
     echo "<pending_credit>\n";
49 49
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
50
-    foreach($results as $result) {
50
+    foreach ($results as $result) {
51 51
         echo "<result>\n";
52 52
         echo "    <resultid>".$result->id."</resultid>\n";
53 53
         echo "    <workunitid>".$result->workunitid."</workunitid>\n";
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
     start_table();
68 68
     echo "<tr><th>".tra("Result ID")."</th><th>".tra("Workunit ID")."</th><th>".tra("Host ID")."</th><th>".tra("Claimed credit")."</th></tr>\n";
69 69
     $results = BoincResult::enum("userid=$user->id AND (validate_state=0 OR validate_state=4) AND claimed_credit > 0");
70
-    foreach($results as $result) {
70
+    foreach ($results as $result) {
71 71
         echo "<tr>\n";
72 72
         echo "<td><a href=\"result.php?resultid=$result->id\">$result->id</a></td>\n";
73 73
         echo "<td><a href=\"workunit.php?wuid=$result->workunitid\">$result->workunitid</a></td>\n";
@@ -82,5 +82,5 @@  discard block
 block discarded – undo
82 82
     page_tail();
83 83
 }
84 84
 
85
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
85
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
86 86
 ?>
Please login to merge, or discard this patch.
html/user/donations.php 1 patch
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.