@@ -295,9 +295,9 @@ discard block |
||
| 295 | 295 | $dp->disk_max_used_pct = parse_config($config, "<default_disk_max_used_pct>"); |
| 296 | 296 | $dp->disk_min_free_gb = parse_config($config, "<default_disk_min_free_gb>"); |
| 297 | 297 | // set some defaults if not found |
| 298 | - if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0; // no limit |
|
| 298 | + if (!$dp->disk_max_used_gb) $dp->disk_max_used_gb = 0; // no limit |
|
| 299 | 299 | if (!$dp->disk_max_used_pct) $dp->disk_max_used_pct = 90; // 90 percent |
| 300 | - if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1; // 1 GB |
|
| 300 | + if (!$dp->disk_min_free_gb) $dp->disk_min_free_gb = 1; // 1 GB |
|
| 301 | 301 | // set mininimum free space scheduler allows |
| 302 | 302 | // - depends on which scheduler is running |
| 303 | 303 | $dp->new_sched_flag = 1; |
@@ -323,7 +323,7 @@ discard block |
||
| 323 | 323 | global $text; |
| 324 | 324 | global $venue_name; |
| 325 | 325 | |
| 326 | - switch($name) { |
|
| 326 | + switch ($name) { |
|
| 327 | 327 | case "venue": |
| 328 | 328 | if (array_key_exists("name", $attrs)) { |
| 329 | 329 | $venue_name = $attrs["name"]; |
@@ -373,7 +373,7 @@ discard block |
||
| 373 | 373 | return; |
| 374 | 374 | } |
| 375 | 375 | } |
| 376 | - switch($name) { |
|
| 376 | + switch ($name) { |
|
| 377 | 377 | case "venue": |
| 378 | 378 | $top_parse_result->$venue_name = $parse_result; |
| 379 | 379 | $parse_result = $top_parse_result; |
@@ -533,7 +533,7 @@ discard block |
||
| 533 | 533 | } |
| 534 | 534 | } |
| 535 | 535 | |
| 536 | -function print_prefs_display_global($user, $columns=false) { |
|
| 536 | +function print_prefs_display_global($user, $columns = false) { |
|
| 537 | 537 | $global_prefs = prefs_parse_global($user->global_prefs); |
| 538 | 538 | |
| 539 | 539 | echo tra("These settings apply to all computers using this account except") |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | .tra("Android devices") |
| 544 | 544 | ."</ul> |
| 545 | 545 | "; |
| 546 | - $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=". (int)!$columns .">".tra("(Switch view)")."</a></font>"; |
|
| 546 | + $switch_link = " <font size=\"-1\"><a href=prefs.php?subset=global&cols=".(int)!$columns.">".tra("(Switch view)")."</a></font>"; |
|
| 547 | 547 | if ($columns) { |
| 548 | 548 | echo "<h3>".tra("Combined preferences").$switch_link."</h3>"; |
| 549 | 549 | start_table(); |
@@ -580,9 +580,9 @@ discard block |
||
| 580 | 580 | // otherwise false |
| 581 | 581 | // |
| 582 | 582 | function print_prefs_form( |
| 583 | - $action, $subset, $venue, $user, $prefs, $cols, $error=false, |
|
| 584 | - $project_error=false |
|
| 585 | -){ |
|
| 583 | + $action, $subset, $venue, $user, $prefs, $cols, $error = false, |
|
| 584 | + $project_error = false |
|
| 585 | +) { |
|
| 586 | 586 | if ($action == "add") { |
| 587 | 587 | $script = "add_venue.php"; |
| 588 | 588 | $submit_value = tra("Add preferences"); |
@@ -622,7 +622,7 @@ discard block |
||
| 622 | 622 | // |
| 623 | 623 | // Functions to display preference subsets as forms |
| 624 | 624 | // |
| 625 | -function prefs_form_global($user, $prefs, $error=false) { |
|
| 625 | +function prefs_form_global($user, $prefs, $error = false) { |
|
| 626 | 626 | global $in_use_prefs; |
| 627 | 627 | global $not_in_use_prefs; |
| 628 | 628 | global $job_prefs; |
@@ -659,9 +659,9 @@ discard block |
||
| 659 | 659 | // |
| 660 | 660 | function prefs_form_radio_buttons($name, $yesno) { |
| 661 | 661 | $rb = tra("yes")." <input type=radio name=$name value=yes " |
| 662 | - .($yesno?"checked":"") |
|
| 662 | + .($yesno ? "checked" : "") |
|
| 663 | 663 | ."> ".tra("no")." <input type=radio name=$name value=no " |
| 664 | - .($yesno?"":"checked") |
|
| 664 | + .($yesno ? "" : "checked") |
|
| 665 | 665 | .">\n"; |
| 666 | 666 | return $rb; |
| 667 | 667 | } |
@@ -680,12 +680,12 @@ discard block |
||
| 680 | 680 | } |
| 681 | 681 | function venue_show($user) { |
| 682 | 682 | $venue = $user->venue; |
| 683 | - if ($venue =='') $venue = '---'; |
|
| 683 | + if ($venue == '') $venue = '---'; |
|
| 684 | 684 | tooltip_row2(VENUE_TOOLTIP, VENUE_DESC, $venue); |
| 685 | 685 | } |
| 686 | 686 | |
| 687 | 687 | function venue_form($user) { |
| 688 | - $n=$h=$w=$s=$m=''; |
|
| 688 | + $n = $h = $w = $s = $m = ''; |
|
| 689 | 689 | if ($user->venue == '') $n = 'selected'; |
| 690 | 690 | if ($user->venue == 'home') $h = 'selected'; |
| 691 | 691 | if ($user->venue == 'work') $w = 'selected'; |
@@ -743,7 +743,7 @@ discard block |
||
| 743 | 743 | // |
| 744 | 744 | // convert prefs from structure to XML |
| 745 | 745 | // |
| 746 | -function global_prefs_make_xml($prefs, $primary=true) { |
|
| 746 | +function global_prefs_make_xml($prefs, $primary = true) { |
|
| 747 | 747 | global $in_use_prefs; |
| 748 | 748 | global $not_in_use_prefs; |
| 749 | 749 | global $job_prefs; |