@@ -673,7 +673,7 @@ discard block |
||
| 673 | 673 | "<a href=show_user.php?userid=$owner->id>$owner->name</a>" |
| 674 | 674 | ); |
| 675 | 675 | } |
| 676 | - row2("application", $app?$app->name:'---'); |
|
| 676 | + row2("application", $app ? $app->name : '---'); |
|
| 677 | 677 | row2("state", batch_state_string($batch->state)); |
| 678 | 678 | //row2("# jobs", $batch->njobs); |
| 679 | 679 | //row2("# error jobs", $batch->nerror_jobs); |
@@ -763,11 +763,11 @@ discard block |
||
| 763 | 763 | "GFLOPS-hours" |
| 764 | 764 | ]; |
| 765 | 765 | row_heading_array($x); |
| 766 | - foreach($wus as $wu) { |
|
| 766 | + foreach ($wus as $wu) { |
|
| 767 | 767 | if ($status && $wu->status != $status) continue; |
| 768 | 768 | $y = ''; |
| 769 | 769 | $c = '---'; |
| 770 | - switch($wu->status) { |
|
| 770 | + switch ($wu->status) { |
|
| 771 | 771 | case WU_SUCCESS: |
| 772 | 772 | $resultid = $wu->canonical_resultid; |
| 773 | 773 | $y = sprintf('<font color="%s">completed</font>', COLOR_SUCCESS); |
@@ -858,7 +858,7 @@ discard block |
||
| 858 | 858 | if ($result->id == $wu->canonical_resultid) { |
| 859 | 859 | $log_names = get_outfile_log_names($result); |
| 860 | 860 | $nfiles = count($log_names); |
| 861 | - for ($i=0; $i<$nfiles; $i++) { |
|
| 861 | + for ($i = 0; $i < $nfiles; $i++) { |
|
| 862 | 862 | $name = $log_names[$i]; |
| 863 | 863 | // don't show 'view' link if it's a .zip |
| 864 | 864 | $y = "$name: "; |
@@ -882,7 +882,7 @@ discard block |
||
| 882 | 882 | $phys_names = get_outfile_phys_names($result); |
| 883 | 883 | $log_names = get_outfile_log_names($result); |
| 884 | 884 | $nfiles = count($log_names); |
| 885 | - for ($i=0; $i<$nfiles; $i++) { |
|
| 885 | + for ($i = 0; $i < $nfiles; $i++) { |
|
| 886 | 886 | $path = dir_hier_path( |
| 887 | 887 | $phys_names[$i], $upload_dir, $fanout |
| 888 | 888 | ); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | $app = BoincApp::lookup_id($ua->app_id); |
| 39 | 39 | $names[] = $app->name; |
| 40 | 40 | } |
| 41 | - $sub = $names?implode(', ', $names):'---'; |
|
| 41 | + $sub = $names ?implode(', ', $names) : '---'; |
|
| 42 | 42 | } |
| 43 | 43 | if ($u->manage_all) { |
| 44 | 44 | $admin = 'All applications'; |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | $app = BoincApp::lookup_id($ua->app_id); |
| 50 | 50 | $names[] = $app->name; |
| 51 | 51 | } |
| 52 | - $admin = $names?implode(', ', $names):'---'; |
|
| 52 | + $admin = $names ?implode(', ', $names) : '---'; |
|
| 53 | 53 | } |
| 54 | 54 | [$yes, $no] = read_kw_prefs($user); |
| 55 | 55 | global $job_keywords; |
@@ -69,7 +69,7 @@ discard block |
||
| 69 | 69 | implode('<br>', $kws), |
| 70 | 70 | $u->quota, |
| 71 | 71 | $u->max_jobs_in_progress, |
| 72 | - ($u->logical_start_time > time())?local_time_str($u->logical_start_time):'---' |
|
| 72 | + ($u->logical_start_time > time()) ?local_time_str($u->logical_start_time) : '---' |
|
| 73 | 73 | ); |
| 74 | 74 | } |
| 75 | 75 | |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | 'max_jobs_in_progress', $usub->max_jobs_in_progress |
| 149 | 149 | ); |
| 150 | 150 | form_general('Run jobs only on own computers?', |
| 151 | - $user->seti_id?'yes':'no' |
|
| 151 | + $user->seti_id ? 'yes' : 'no' |
|
| 152 | 152 | ); |
| 153 | 153 | form_submit('Update'); |
| 154 | 154 | form_end(); |
@@ -204,18 +204,18 @@ discard block |
||
| 204 | 204 | $manage_apps = array_map('intval', $manage_apps); |
| 205 | 205 | foreach ($apps as $app) { |
| 206 | 206 | $s = in_array($app->id, $submit_apps); |
| 207 | - $m = in_array($app->id, $manage_apps)?1:0; |
|
| 207 | + $m = in_array($app->id, $manage_apps) ? 1 : 0; |
|
| 208 | 208 | if ($s || $m) { |
| 209 | 209 | BoincUserSubmitApp::insert( |
| 210 | 210 | "(user_id, app_id, manage) values ($user_id, $app->id, $m)" |
| 211 | 211 | ); |
| 212 | 212 | } |
| 213 | 213 | } |
| 214 | - $quota = (double) get_str('quota'); |
|
| 214 | + $quota = (double)get_str('quota'); |
|
| 215 | 215 | if ($quota != $us->quota) { |
| 216 | 216 | $us->update("quota=$quota"); |
| 217 | 217 | } |
| 218 | - $mj = (int) get_str('max_jobs_in_progress'); |
|
| 218 | + $mj = (int)get_str('max_jobs_in_progress'); |
|
| 219 | 219 | if ($mj != $us->max_jobs_in_progress) { |
| 220 | 220 | $us->update("max_jobs_in_progress=$mj"); |
| 221 | 221 | } |