Passed
Push — master ( 80d4cc...76a455 )
by Kevin
09:34 queued 11s
created
html/user/submit_test.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
     $job = new StdClass;
28 28
     $job->input_files = array($f);
29 29
 
30
-    for ($i=10; $i<20; $i++) {
30
+    for ($i = 10; $i < 20; $i++) {
31 31
         $job->rsc_fpops_est = $i*1e9;
32 32
         $job->command_line = "--t $i";
33 33
         $req->jobs[] = $job;
Please login to merge, or discard this patch.
html/user/weak_auth.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -30,14 +30,14 @@  discard block
 block discarded – undo
30 30
 //
31 31
 $idx = strpos($master_url, '://');
32 32
 if ($idx) {
33
-    $url = substr($master_url, $idx+strlen('://'));
33
+    $url = substr($master_url, $idx + strlen('://'));
34 34
 } else {
35 35
     $url = $master_url;
36 36
 }
37 37
 
38 38
 // convert invalid characters into underscores
39 39
 //
40
-for ($i=0; $i<strlen($url); $i++) {
40
+for ($i = 0; $i < strlen($url); $i++) {
41 41
     $c = $url[$i];
42 42
     if (!ctype_alnum($c) && $c != '.' && $c != '-' && $c != '_') {
43 43
         $url[$i] = '_';
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
 
47 47
 //remove trailing underscore(s)
48 48
 //
49
-$account_file = "account_" . rtrim($url, '_') . ".xml";
49
+$account_file = "account_".rtrim($url, '_').".xml";
50 50
 
51 51
 echo "<table><tr><td>",
52 52
     tra("You can access your account either by using your email address and password,
@@ -56,12 +56,12 @@  discard block
 block discarded – undo
56 56
     <p>",
57 57
     tra("This key can be used to:"),
58 58
     "<ul>
59
-    <li><a href=get_passwd.php>",tra("log in to your account on the web"),"</a>;
59
+    <li><a href=get_passwd.php>",tra("log in to your account on the web"), "</a>;
60 60
     <li>",
61 61
         tra("to attach a computer to your account without using the BOINC Manager.
62 62
        To do so, install BOINC,
63 63
        create a file named %1 in the BOINC
64
-       data directory, and set its contents to:","<b>$account_file</b>"),"
64
+       data directory, and set its contents to:","<b>$account_file</b>"), "
65 65
     <pre>",
66 66
     htmlspecialchars(
67 67
 "<account>
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
     as described above, but cannot be used to log in to your account or change it in any way.
76 76
     If you want to attach untrusted or insecure computers to your account,
77 77
     do so using your weak account key.
78
-    Your weak account key is:"),"
78
+    Your weak account key is:"), "
79 79
     <pre>$weak_auth</pre>
80 80
     <p>",
81
-    tra("If you change your password, your weak account key changes, and your previous weak account key becomes invalid."),"
81
+    tra("If you change your password, your weak account key changes, and your previous weak account key becomes invalid."), "
82 82
     </td></tr></table>"
83 83
 ;
84 84
 
Please login to merge, or discard this patch.
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 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/user_permissions.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
     row1("Current special users", 99);
29 29
 
30 30
     echo "<tr><th>User</th>";
31
-    for ($i=0; $i<S_NFLAGS; $i++) {
32
-        echo "<th>" . $special_user_bitfield[$i] . "</th>\n";
31
+    for ($i = 0; $i < S_NFLAGS; $i++) {
32
+        echo "<th>".$special_user_bitfield[$i]."</th>\n";
33 33
     }
34 34
     echo "<th> </th></tr>";
35 35
 
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
             <form action=\"user_permissions.php\" method=\"POST\">
45 45
             <input type=\"hidden\" name=\"userid\" value=\"$foo->userid\">
46 46
         ";
47
-        for ($j=0; $j<S_NFLAGS; $j++) {
47
+        for ($j = 0; $j < S_NFLAGS; $j++) {
48 48
             $bit = substr($foo->special_user, $j, 1);
49
-            $c = ($bit == 1)?"checked":"";
49
+            $c = ($bit == 1) ? "checked" : "";
50 50
             echo "<td>
51 51
                 <input type=\"checkbox\" name=\"role".$j."\" value=\"1\" $c>
52 52
                 </td>
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
         <td>Add User ID:<input type=\"text\" name=\"userid\" size=\"6\"></td>
63 63
     ";
64 64
 
65
-    for ($j=0; $j<S_NFLAGS; $j++) {
65
+    for ($j = 0; $j < S_NFLAGS; $j++) {
66 66
         echo "<td>
67 67
             <input type=\"checkbox\" name=\"role".$j."\" value=\"1\">
68 68
             </td>
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 function user_permissions_action() {
84 84
     $bitset = '';
85 85
 
86
-    for ($i=0; $i<S_NFLAGS; $i++) {
86
+    for ($i = 0; $i < S_NFLAGS; $i++) {
87 87
         if (post_int("role".$i, TRUE) == 1) {
88 88
             $bitset .= '1';
89 89
             echo "<br> setting $i";
@@ -111,5 +111,5 @@  discard block
 block discarded – undo
111 111
     user_permissions_form();
112 112
 }
113 113
 
114
-$cvs_version_tracker[]="\$Id$";  //Generated automatically - do not edit
114
+$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit
115 115
 ?>
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
     $bitset = '';
85 85
 
86 86
     for ($i=0; $i<S_NFLAGS; $i++) {
87
-        if (post_int("role".$i, TRUE) == 1) {
87
+        if (post_int("role".$i, true) == 1) {
88 88
             $bitset .= '1';
89 89
             echo "<br> setting $i";
90 90
         } else {
Please login to merge, or discard this patch.
html/user/job_file.php 2 patches
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -80,20 +80,20 @@
 block discarded – undo
80 80
 
81 81
 function upload_error_description($errno) {
82 82
     switch($errno) {
83
-        case UPLOAD_ERR_INI_SIZE:
84
-            return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85
-        case UPLOAD_ERR_FORM_SIZE:
86
-            return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break;
87
-        case UPLOAD_ERR_PARTIAL:
88
-            return "The uploaded file was only partially uploaded."; break;
89
-        case UPLOAD_ERR_NO_FILE:
90
-            return "No file was uploaded."; break;
91
-        case UPLOAD_ERR_NO_TMP_DIR:
92
-            return "Missing a temporary folder."; break;
93
-        case UPLOAD_ERR_CANT_WRITE:
94
-            return "Failed to write file to disk."; break;
95
-        case UPLOAD_ERR_EXTENSION:
96
-            return "A PHP extension stopped the file upload."; break;
83
+    case UPLOAD_ERR_INI_SIZE:
84
+        return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85
+    case UPLOAD_ERR_FORM_SIZE:
86
+        return "The uploaded file exceeds the MAX_FILE_SIZE specified in the HTML form."; break;
87
+    case UPLOAD_ERR_PARTIAL:
88
+        return "The uploaded file was only partially uploaded."; break;
89
+    case UPLOAD_ERR_NO_FILE:
90
+        return "No file was uploaded."; break;
91
+    case UPLOAD_ERR_NO_TMP_DIR:
92
+        return "Missing a temporary folder."; break;
93
+    case UPLOAD_ERR_CANT_WRITE:
94
+        return "Failed to write file to disk."; break;
95
+    case UPLOAD_ERR_EXTENSION:
96
+        return "A PHP extension stopped the file upload."; break;
97 97
     }
98 98
 }
99 99
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 require_once("../inc/submit_util.inc");
80 80
 
81 81
 function upload_error_description($errno) {
82
-    switch($errno) {
82
+    switch ($errno) {
83 83
         case UPLOAD_ERR_INI_SIZE:
84 84
             return "The uploaded file exceeds upload_max_filesize of php.ini."; break;
85 85
         case UPLOAD_ERR_FORM_SIZE:
@@ -105,13 +105,13 @@  discard block
 block discarded – undo
105 105
     $delete_time = (int)$r->delete_time;
106 106
     $batch_id = (int)$r->batch_id;
107 107
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
108
-    $phys_names= array();
109
-    foreach($r->phys_name as $f) {
108
+    $phys_names = array();
109
+    foreach ($r->phys_name as $f) {
110 110
         $phys_names[] = (string)$f;
111 111
     }
112 112
     $i = 0;
113
-    foreach($phys_names as $fname) {
114
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
113
+    foreach ($phys_names as $fname) {
114
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
115 115
 
116 116
         // if the job_file record is there,
117 117
         // update the delete time first to avoid race condition
@@ -216,9 +216,9 @@  discard block
 block discarded – undo
216 216
     foreach ($_FILES as $f) {
217 217
         $tmp_name = $f['tmp_name'];
218 218
         $fname = $phys_names[$i];
219
-        $path = dir_hier_path($fname, project_dir() . "/download", $fanout);
219
+        $path = dir_hier_path($fname, project_dir()."/download", $fanout);
220 220
 
221
-        switch(check_download_file($tmp_name, $path)) {
221
+        switch (check_download_file($tmp_name, $path)) {
222 222
         case 0:
223 223
             break;
224 224
         case 1:
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
 if ($request_log) {
267 267
     $request_log_dir = parse_config(get_config(), "<log_dir>");
268 268
     if ($request_log_dir) {
269
-        $request_log = $request_log_dir . "/" . $request_log;
269
+        $request_log = $request_log_dir."/".$request_log;
270 270
     }
271 271
     if ($file = fopen($request_log, "a+")) {
272
-        fwrite($file, "\n<job_file date=\"" . date(DATE_ATOM) . "\">\n" . $_POST['request'] . "\n</job_file>\n");
272
+        fwrite($file, "\n<job_file date=\"".date(DATE_ATOM)."\">\n".$_POST['request']."\n</job_file>\n");
273 273
         fclose($file);
274 274
     }
275 275
 }
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
     xml_error(-1, "can't parse request message: $req", __FILE__, __LINE__);
282 282
 }
283 283
 
284
-switch($r->getName()) {
284
+switch ($r->getName()) {
285 285
 case 'query_files':
286 286
     query_files($r);
287 287
     break;
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.