Passed
Push — master ( 15d0db...c63620 )
by David
30:13 queued 19:33
created
html/inc/dir_hier.inc 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 }
38 38
 
39 39
 function upload_path($filename) {
40
-    static $upload_dir=null;
40
+    static $upload_dir = null;
41 41
     if (!$upload_dir) {
42 42
         $config = get_config();
43 43
         $upload_dir = parse_config($config, '<upload_dir>');
Please login to merge, or discard this patch.
html/user/submit.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         "Canonical instance<br><small>click to see result page on BOINC server</smallp>",
413 413
         "Download Results"
414 414
     );
415
-    foreach($wus as $wu) {
415
+    foreach ($wus as $wu) {
416 416
         $resultid = $wu->canonical_resultid;
417 417
         if ($resultid) {
418 418
             $x = "<a href=result.php?resultid=$resultid>$resultid</a>";
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
             $text = "---";
424 424
             if ($batch->state == BATCH_STATE_COMPLETE) {
425 425
                 $y = '<font color="red">failed</font>';
426
-            }   else {
426
+            } else {
427 427
                 $y = "in progress";
428 428
             }
429 429
         }
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
     $results = BoincResult::enum("workunitid=$wuid");
489 489
     $upload_dir = parse_config(get_config(), "<upload_dir>");
490 490
     $fanout = parse_config(get_config(), "<uldl_dir_fanout>");
491
-    foreach($results as $result) {
491
+    foreach ($results as $result) {
492 492
         echo "<tr>
493 493
             <td><a href=result.php?resultid=$result->id>$result->id &middot; $result->name </a></td>
494 494
             <td>".state_string($result)."</td>
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
         if ($result->server_state == 5) {
499 499
             $phys_names = get_outfile_names($result);
500 500
             $log_names = get_outfile_log_names($result);
501
-            for ($i=0; $i<count($phys_names); $i++) {
501
+            for ($i = 0; $i < count($phys_names); $i++) {
502 502
                 $url = sprintf(
503 503
                     'get_output2.php?cmd=result&result_id=%d&file_num=%d',
504 504
                     $result->id, $i
Please login to merge, or discard this patch.
html/user/get_output2.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     if ($user->authenticator != $auth) die('bad auth');
52 52
 }
53 53
 
54
-function do_result_aux($result, $batch, $file_num=null) {
54
+function do_result_aux($result, $batch, $file_num = null) {
55 55
     $phys_names = get_outfile_names($result);
56 56
     $log_names = get_outfile_log_names($result);
57 57
     if ($file_num !== null) {
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
         $dir_path = "submit/$batch->id/$result->name";
72 72
         system("rm -r $dir_path");
73 73
         mkdir($dir_path);
74
-        for ($i=0; $i<count($phys_names); $i++) {
74
+        for ($i = 0; $i < count($phys_names); $i++) {
75 75
             $cmd = sprintf('ln -s %s %s/%s',
76 76
                 upload_path($phys_names[$i]),
77 77
                 $dir_path,
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
     }
89 89
 }
90 90
 
91
-function do_result($result_id, $auth, $file_num=null) {
91
+function do_result($result_id, $auth, $file_num = null) {
92 92
     $result = BoincResult::lookup_id($result_id);
93 93
     if (!$result) die("no result $result_id");
94 94
     $workunit = BoincWorkunit::lookup_id($result->workunitid);
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
             system($cmd);
136 136
         } else {
137 137
             mkdir(sprintf('%s/%s', $dir_path, $result->name));
138
-            for ($i=0; $i<count($phys_names); $i++) {
138
+            for ($i = 0; $i < count($phys_names); $i++) {
139 139
                 $cmd = sprintf('ln -s %s %s/%s/%s',
140 140
                     upload_path($phys_names[$i]),
141 141
                     $dir_path,
Please login to merge, or discard this patch.