@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | require_once("../inc/util.inc"); |
| 31 | 31 | require_once("../inc/xml.inc"); |
| 32 | 32 | require_once("../inc/boinc_db.inc"); |
| 33 | -if(file_exists('../../release.inc')) |
|
| 33 | +if (file_exists('../../release.inc')) |
|
| 34 | 34 | include '../../release.inc'; |
| 35 | 35 | |
| 36 | 36 | if (!defined('STATUS_PAGE_TTL')) { |
@@ -173,7 +173,7 @@ discard block |
||
| 173 | 173 | $avg = round($app->info->avg, 2); |
| 174 | 174 | $min = round($app->info->min, 2); |
| 175 | 175 | $max = round($app->info->max, 2); |
| 176 | - $x = $max?"$avg ($min - $max)":"---"; |
|
| 176 | + $x = $max ? "$avg ($min - $max)" : "---"; |
|
| 177 | 177 | $u = $app->info->users; |
| 178 | 178 | echo "<tr> |
| 179 | 179 | <td>$app->user_friendly_name</td> |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | global $server_version; |
| 190 | 190 | global $git_commit; |
| 191 | 191 | |
| 192 | - if ( isset($server_version) && isset($git_commit) ) { |
|
| 192 | + if (isset($server_version) && isset($git_commit)) { |
|
| 193 | 193 | echo "Server version: $server_version (<a href=https://github.com/BOINC/boinc/commit/$git_commit>$git_commit)</a>)<br>"; |
| 194 | 194 | } |
| 195 | 195 | |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | $cmd = trim($cmd); |
| 255 | 255 | $x = explode(" ", $cmd); |
| 256 | 256 | $prog = $x[0]; |
| 257 | - $pidname = $prog . '.pid'; |
|
| 257 | + $pidname = $prog.'.pid'; |
|
| 258 | 258 | } |
| 259 | 259 | $path = "../../pid_$host/$pidname"; |
| 260 | 260 | if (is_file($path)) { |
@@ -295,12 +295,12 @@ discard block |
||
| 295 | 295 | } |
| 296 | 296 | $master_host = $u["host"]; |
| 297 | 297 | if ($config->www_host) { |
| 298 | - $web_host = trim((string) $config->www_host); |
|
| 298 | + $web_host = trim((string)$config->www_host); |
|
| 299 | 299 | } else { |
| 300 | 300 | $web_host = $main_host; |
| 301 | 301 | } |
| 302 | 302 | if ($config->sched_host) { |
| 303 | - $sched_host = trim((string) $config->sched_host); |
|
| 303 | + $sched_host = trim((string)$config->sched_host); |
|
| 304 | 304 | } else { |
| 305 | 305 | $sched_host = $main_host; |
| 306 | 306 | } |
@@ -310,7 +310,7 @@ discard block |
||
| 310 | 310 | |
| 311 | 311 | // the upload and download servers are sort of daemons too |
| 312 | 312 | // |
| 313 | - $url = trim((string) $config->download_url); |
|
| 313 | + $url = trim((string)$config->download_url); |
|
| 314 | 314 | $u = parse_url($url); |
| 315 | 315 | $h = $u["host"]; |
| 316 | 316 | if ($h == $master_host) { |
@@ -322,14 +322,14 @@ discard block |
||
| 322 | 322 | } else { |
| 323 | 323 | $have_remote = true; |
| 324 | 324 | } |
| 325 | - $url = trim((string) $config->upload_url); |
|
| 325 | + $url = trim((string)$config->upload_url); |
|
| 326 | 326 | $u = parse_url($url); |
| 327 | 327 | $h = $u["host"]; |
| 328 | 328 | if ($h == $master_host) { |
| 329 | 329 | $y = new StdClass; |
| 330 | 330 | $y->cmd = "Upload server"; |
| 331 | 331 | $y->host = $h; |
| 332 | - $y->status = !file_exists("../../stop_upload");; |
|
| 332 | + $y->status = !file_exists("../../stop_upload"); ; |
|
| 333 | 333 | $local_daemons[] = $y; |
| 334 | 334 | } else { |
| 335 | 335 | $have_remote = true; |
@@ -341,7 +341,7 @@ discard block |
||
| 341 | 341 | $y = new StdClass; |
| 342 | 342 | $y->cmd = "Scheduler"; |
| 343 | 343 | $y->host = $sched_host; |
| 344 | - $y->status = !file_exists("../../stop_sched");; |
|
| 344 | + $y->status = !file_exists("../../stop_sched"); ; |
|
| 345 | 345 | $local_daemons[] = $y; |
| 346 | 346 | } else { |
| 347 | 347 | $have_remote = true; |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | $disabled_daemons[] = $x; |
| 358 | 358 | continue; |
| 359 | 359 | } |
| 360 | - $host = $d->host?(string)$d->host:$main_host; |
|
| 360 | + $host = $d->host ? (string)$d->host : $main_host; |
|
| 361 | 361 | if ($host != $web_host) { |
| 362 | 362 | $have_remote = true; |
| 363 | 363 | continue; |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | require_once("../inc/consent.inc"); |
| 20 | 20 | require_once("../inc/util.inc"); |
| 21 | 21 | require_once("../inc/xml.inc"); |
| 22 | -if(file_exists('../../release.inc')) |
|
| 22 | +if (file_exists('../../release.inc')) |
|
| 23 | 23 | include '../../release.inc'; |
| 24 | 24 | |
| 25 | 25 | BoincDb::get(true); |
@@ -31,10 +31,10 @@ discard block |
||
| 31 | 31 | // |
| 32 | 32 | function show_platforms() { |
| 33 | 33 | $xmlFragment = unserialize(get_cached_data(3600, "project_config_platform_xml")); |
| 34 | - if ($xmlFragment==false){ |
|
| 34 | + if ($xmlFragment == false) { |
|
| 35 | 35 | $platforms = BoincDB::get()->enum_fields("platform, DBNAME.app_version, DBNAME.app", "BoincPlatform", "platform.name, platform.user_friendly_name, plan_class", "app_version.platformid = platform.id and app_version.appid = app.id and app_version.deprecated=0 and app.deprecated=0 group by platform.name, plan_class", ""); |
| 36 | 36 | $xmlFragment = " <platforms>"; |
| 37 | - foreach ($platforms as $platform){ |
|
| 37 | + foreach ($platforms as $platform) { |
|
| 38 | 38 | $xmlFragment .= " |
| 39 | 39 | <platform> |
| 40 | 40 | <platform_name>$platform->name</platform_name> |
@@ -66,11 +66,11 @@ discard block |
||
| 66 | 66 | <web_rpc_url_base>".secure_url_base()."</web_rpc_url_base> |
| 67 | 67 | "; |
| 68 | 68 | |
| 69 | -if ( isset($git_commit) ) { |
|
| 69 | +if (isset($git_commit)) { |
|
| 70 | 70 | echo "<git_commit>$git_commit</git_commit>\n"; |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | -if ( isset($server_version) ) { |
|
| 73 | +if (isset($server_version)) { |
|
| 74 | 74 | echo "<server_version>$server_version</server_version>\n"; |
| 75 | 75 | } |
| 76 | 76 | |
@@ -122,7 +122,7 @@ discard block |
||
| 122 | 122 | $tou_file = TERMSOFUSE_FILE; |
| 123 | 123 | } |
| 124 | 124 | else { |
| 125 | - $tou_file = "../../terms_of_use.txt"; |
|
| 125 | + $tou_file = "../../terms_of_use.txt"; |
|
| 126 | 126 | } |
| 127 | 127 | if (file_exists($tou_file)) { |
| 128 | 128 | $terms_of_use = trim(file_get_contents($tou_file)); |