@@ -365,11 +365,11 @@ discard block |
||
365 | 365 | function progress_bar($batch, $wus, $width) { |
366 | 366 | $w_success = $width*$batch->fraction_done; |
367 | 367 | $w_fail = $width*$batch->nerror_jobs/$batch->njobs; |
368 | - $nsuccess = $batch->njobs * $batch->fraction_done; |
|
368 | + $nsuccess = $batch->njobs*$batch->fraction_done; |
|
369 | 369 | $nsent = wus_nsent($wus); |
370 | 370 | $nprog = $nsent - $nsuccess - $batch->nerror_jobs; |
371 | 371 | $w_prog = $width*$nprog/$batch->njobs; |
372 | - $nunsent = $batch->njobs-$nsent; |
|
372 | + $nunsent = $batch->njobs - $nsent; |
|
373 | 373 | $w_unsent = $width*$nunsent/$batch->njobs; |
374 | 374 | $x = '<table height=20><tr>'; |
375 | 375 | if ($w_fail) { |
@@ -454,7 +454,7 @@ discard block |
||
454 | 454 | "Canonical instance<br><small>click to see result page on BOINC server</smallp>", |
455 | 455 | "Download Results" |
456 | 456 | ); |
457 | - foreach($wus as $wu) { |
|
457 | + foreach ($wus as $wu) { |
|
458 | 458 | $resultid = $wu->canonical_resultid; |
459 | 459 | if ($resultid) { |
460 | 460 | $x = "<a href=result.php?resultid=$resultid>$resultid</a>"; |
@@ -465,7 +465,7 @@ discard block |
||
465 | 465 | $text = "---"; |
466 | 466 | if ($batch->state == BATCH_STATE_COMPLETE) { |
467 | 467 | $y = '<font color="red">failed</font>'; |
468 | - } else { |
|
468 | + } else { |
|
469 | 469 | $y = "in progress"; |
470 | 470 | } |
471 | 471 | } |
@@ -530,7 +530,7 @@ discard block |
||
530 | 530 | $results = BoincResult::enum("workunitid=$wuid"); |
531 | 531 | $upload_dir = parse_config(get_config(), "<upload_dir>"); |
532 | 532 | $fanout = parse_config(get_config(), "<uldl_dir_fanout>"); |
533 | - foreach($results as $result) { |
|
533 | + foreach ($results as $result) { |
|
534 | 534 | echo "<tr> |
535 | 535 | <td><a href=result.php?resultid=$result->id>$result->id · $result->name </a></td> |
536 | 536 | <td>".state_string($result)."</td> |
@@ -540,7 +540,7 @@ discard block |
||
540 | 540 | if ($result->server_state == 5) { |
541 | 541 | $phys_names = get_outfile_names($result); |
542 | 542 | $log_names = get_outfile_log_names($result); |
543 | - for ($i=0; $i<count($phys_names); $i++) { |
|
543 | + for ($i = 0; $i < count($phys_names); $i++) { |
|
544 | 544 | $url = sprintf( |
545 | 545 | 'get_output2.php?cmd=result&result_id=%d&file_num=%d', |
546 | 546 | $result->id, $i |