@@ -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 | |
@@ -199,18 +199,18 @@ discard block |
||
199 | 199 | $manage_apps = array_map('intval', $manage_apps); |
200 | 200 | foreach ($apps as $app) { |
201 | 201 | $s = in_array($app->id, $submit_apps); |
202 | - $m = in_array($app->id, $manage_apps)?1:0; |
|
202 | + $m = in_array($app->id, $manage_apps) ? 1 : 0; |
|
203 | 203 | if ($s || $m) { |
204 | 204 | BoincUserSubmitApp::insert( |
205 | 205 | "(user_id, app_id, manage) values ($user_id, $app->id, $m)" |
206 | 206 | ); |
207 | 207 | } |
208 | 208 | } |
209 | - $quota = (double) get_str('quota'); |
|
209 | + $quota = (double)get_str('quota'); |
|
210 | 210 | if ($quota != $us->quota) { |
211 | 211 | $us->update("quota=$quota"); |
212 | 212 | } |
213 | - $mj = (int) get_str('max_jobs_in_progress'); |
|
213 | + $mj = (int)get_str('max_jobs_in_progress'); |
|
214 | 214 | if ($mj != $us->max_jobs_in_progress) { |
215 | 215 | $us->update("max_jobs_in_progress=$mj"); |
216 | 216 | } |
@@ -31,14 +31,14 @@ |
||
31 | 31 | if (file_exists($path)) { |
32 | 32 | $x = file($path); |
33 | 33 | $yes = explode(' ', trim($x[0])); |
34 | - if ($yes[0]=='') $yes=[]; |
|
34 | + if ($yes[0] == '') $yes = []; |
|
35 | 35 | $yes = array_map('intval', $yes); |
36 | 36 | $no = explode(' ', trim($x[1])); |
37 | - if ($no[0]=='') $no=[]; |
|
37 | + if ($no[0] == '') $no = []; |
|
38 | 38 | $no = array_map('intval', $no); |
39 | 39 | return [$yes, $no]; |
40 | 40 | } else { |
41 | - return [[],[]]; |
|
41 | + return [[], []]; |
|
42 | 42 | } |
43 | 43 | } |
44 | 44 |
@@ -32,7 +32,7 @@ |
||
32 | 32 | |
33 | 33 | function boinc_recaptcha_get_html($publickey) { |
34 | 34 | if ($publickey) { |
35 | - return '<div class="g-recaptcha" data-sitekey="' . $publickey . '"></div>'; |
|
35 | + return '<div class="g-recaptcha" data-sitekey="'.$publickey.'"></div>'; |
|
36 | 36 | } else { |
37 | 37 | return ''; |
38 | 38 | } |
@@ -179,7 +179,7 @@ discard block |
||
179 | 179 | foreach ($res_in_prog as $res) { |
180 | 180 | $wus_in_prog[$res->workunitid] = true; |
181 | 181 | } |
182 | - unset($res_in_progress); // does this do anything? |
|
182 | + unset($res_in_progress); // does this do anything? |
|
183 | 183 | |
184 | 184 | $fp_total = 0; |
185 | 185 | $fp_done = 0; |
@@ -352,7 +352,7 @@ discard block |
||
352 | 352 | // get the total size of output files of a batch |
353 | 353 | // |
354 | 354 | function batch_output_file_size($batchid) { |
355 | - $batch_td_size=0; |
|
355 | + $batch_td_size = 0; |
|
356 | 356 | $wus = BoincWorkunit::enum_fields( |
357 | 357 | 'canonical_resultid', |
358 | 358 | "batch=$batchid" |
@@ -385,7 +385,7 @@ discard block |
||
385 | 385 | } |
386 | 386 | |
387 | 387 | function boinc_get_wu_output_files_url($user, $wu_id) { |
388 | - $auth_str = md5($user->authenticator.$wu_id); |
|
388 | + $auth_str = md5($user->authenticator.$wu_id); |
|
389 | 389 | return "get_output.php?cmd=workunit_files&wu_id=$wu_id&auth_str=$auth_str"; |
390 | 390 | } |
391 | 391 | |
@@ -419,7 +419,7 @@ discard block |
||
419 | 419 | if (!file_exists($path)) return null; |
420 | 420 | $x = file_get_contents($path); |
421 | 421 | $n = sscanf($x, "%s %d", $md5, $size); |
422 | - if ($n != 2 || strlen($md5)!=32) { |
|
422 | + if ($n != 2 || strlen($md5) != 32) { |
|
423 | 423 | return null; |
424 | 424 | } |
425 | 425 | return [$md5, $size]; |