@@ -168,7 +168,7 @@ discard block |
||
168 | 168 | "Name", "ID", "User", "App", "# Jobs", "Submitted", "Select" |
169 | 169 | ); |
170 | 170 | } |
171 | - $x = ($batch->state == BATCH_STATE_RETIRED) ? "(retired)":''; |
|
171 | + $x = ($batch->state == BATCH_STATE_RETIRED) ? "(retired)" : ''; |
|
172 | 172 | table_row( |
173 | 173 | "<a href=submit.php?action=query_batch&batch_id=$batch->id>$batch->name $x</a>", |
174 | 174 | "<a href=submit.php?action=query_batch&batch_id=$batch->id>$batch->id</a>", |
@@ -544,7 +544,7 @@ discard block |
||
544 | 544 | if ($owner) { |
545 | 545 | row2('submitter', $owner->name); |
546 | 546 | } |
547 | - row2("application", $app?$app->name:'---'); |
|
547 | + row2("application", $app ? $app->name : '---'); |
|
548 | 548 | row2("state", batch_state_string($batch->state)); |
549 | 549 | //row2("# jobs", $batch->njobs); |
550 | 550 | //row2("# error jobs", $batch->nerror_jobs); |
@@ -604,9 +604,9 @@ discard block |
||
604 | 604 | "status" |
605 | 605 | ]; |
606 | 606 | row_heading_array($x); |
607 | - foreach($wus as $wu) { |
|
607 | + foreach ($wus as $wu) { |
|
608 | 608 | $y = ''; |
609 | - switch($wu->status) { |
|
609 | + switch ($wu->status) { |
|
610 | 610 | case WU_SUCCESS: |
611 | 611 | $resultid = $wu->canonical_resultid; |
612 | 612 | $y = '<font color="green">completed</font>'; |
@@ -682,7 +682,7 @@ discard block |
||
682 | 682 | $results = BoincResult::enum("workunitid=$wuid"); |
683 | 683 | $upload_dir = parse_config(get_config(), "<upload_dir>"); |
684 | 684 | $fanout = parse_config(get_config(), "<uldl_dir_fanout>"); |
685 | - foreach($results as $result) { |
|
685 | + foreach ($results as $result) { |
|
686 | 686 | $x = [ |
687 | 687 | "<a href=result.php?resultid=$result->id>$result->id</a>", |
688 | 688 | state_string($result) |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | if ($result->server_state == RESULT_SERVER_STATE_OVER) { |
692 | 692 | $phys_names = get_outfile_phys_names($result); |
693 | 693 | $log_names = get_outfile_log_names($result); |
694 | - for ($i=0; $i<count($phys_names); $i++) { |
|
694 | + for ($i = 0; $i < count($phys_names); $i++) { |
|
695 | 695 | if ($is_assim_move) { |
696 | 696 | // file is in |
697 | 697 | // project/results/<batchid>/<wu_name>__file_<log_name> |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | foreach ($res_in_prog as $res) { |
183 | 183 | $wus_in_prog[$res->workunitid] = true; |
184 | 184 | } |
185 | - unset($res_in_progress); // does this do anything? |
|
185 | + unset($res_in_progress); // does this do anything? |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | $fp_total = 0; |
@@ -345,7 +345,7 @@ discard block |
||
345 | 345 | // get the total size of output files of a batch |
346 | 346 | // |
347 | 347 | function batch_output_file_size($batchid) { |
348 | - $batch_td_size=0; |
|
348 | + $batch_td_size = 0; |
|
349 | 349 | $wus = BoincWorkunit::enum("batch=$batchid"); |
350 | 350 | $fanout = parse_config(get_config(), "<uldl_dir_fanout>"); |
351 | 351 | $upload_dir = parse_config(get_config(), "<upload_dir>"); |
@@ -375,7 +375,7 @@ discard block |
||
375 | 375 | } |
376 | 376 | |
377 | 377 | function boinc_get_wu_output_files_url($user, $wu_id) { |
378 | - $auth_str = md5($user->authenticator.$wu_id); |
|
378 | + $auth_str = md5($user->authenticator.$wu_id); |
|
379 | 379 | return "get_output.php?cmd=workunit_files&wu_id=$wu_id&auth_str=$auth_str"; |
380 | 380 | } |
381 | 381 | |
@@ -409,7 +409,7 @@ discard block |
||
409 | 409 | if (!file_exists($path)) return null; |
410 | 410 | $x = file_get_contents($path); |
411 | 411 | $n = sscanf($x, "%s %d", $md5, $size); |
412 | - if ($n != 2 || strlen($md5)!=32) { |
|
412 | + if ($n != 2 || strlen($md5) != 32) { |
|
413 | 413 | return null; |
414 | 414 | } |
415 | 415 | return [$md5, $size]; |