@@ -100,7 +100,7 @@ |
||
100 | 100 | $dom->preserveWhiteSpace = false; |
101 | 101 | $dom->formatOutput = true; |
102 | 102 | $dom->loadXML($prefs->asXML()); |
103 | - return $dom->saveXML($dom->documentElement) . "\n"; |
|
103 | + return $dom->saveXML($dom->documentElement)."\n"; |
|
104 | 104 | } |
105 | 105 | |
106 | 106 | function update_user($user, $app_id) { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | |
35 | 35 | function cleanup_orphan_threads() { |
36 | 36 | $threads = BoincThread::enum(""); |
37 | - foreach($threads as $thread) { |
|
37 | + foreach ($threads as $thread) { |
|
38 | 38 | $forum = BoincForum::lookup_id($thread->forum); |
39 | 39 | if (!$forum) { |
40 | 40 | cleanup_thread($thread); |
@@ -36,7 +36,7 @@ |
||
36 | 36 | // These are set to large values because otherwise the script has |
37 | 37 | // a tendency to just stop after some time. |
38 | 38 | // |
39 | -ini_set ("memory_limit", "20M"); |
|
39 | +ini_set("memory_limit", "20M"); |
|
40 | 40 | set_time_limit(3600); |
41 | 41 | |
42 | 42 | $receiver = 0; |
@@ -80,41 +80,41 @@ |
||
80 | 80 | die("can't parse config file\n"); |
81 | 81 | } |
82 | 82 | $config = $c->config; |
83 | - $master_url = (string) $config->master_url; |
|
83 | + $master_url = (string)$config->master_url; |
|
84 | 84 | $u = parse_url($master_url); |
85 | 85 | $master_host = $u["host"]; |
86 | 86 | |
87 | - $url = (string) $config->download_url; |
|
87 | + $url = (string)$config->download_url; |
|
88 | 88 | $u = parse_url($url); |
89 | 89 | $h = $u["host"]; |
90 | 90 | if ($h != $master_host) { |
91 | 91 | $y = new StdClass; |
92 | 92 | $y->cmd = 'Download server'; |
93 | 93 | $y->host = $h; |
94 | - $y->status = web_server_running($url)?1:0; |
|
94 | + $y->status = web_server_running($url) ? 1 : 0; |
|
95 | 95 | $x[] = $y; |
96 | 96 | } |
97 | - $url = (string) $config->upload_url; |
|
97 | + $url = (string)$config->upload_url; |
|
98 | 98 | $u = parse_url($url); |
99 | 99 | $h = $u["host"]; |
100 | 100 | if ($h != $master_host) { |
101 | 101 | $y = new StdClass; |
102 | 102 | $y->cmd = 'Upload server'; |
103 | 103 | $y->host = $h; |
104 | - $y->status = web_server_running($url)?1:0; |
|
104 | + $y->status = web_server_running($url) ? 1 : 0; |
|
105 | 105 | $x[] = $y; |
106 | 106 | } |
107 | 107 | |
108 | 108 | $main_host = (string)$c->config->host; |
109 | 109 | if ($c->config->www_host) { |
110 | - $web_host = (string) $c->config->www_host; |
|
110 | + $web_host = (string)$c->config->www_host; |
|
111 | 111 | } else { |
112 | 112 | $web_host = $main_host; |
113 | 113 | } |
114 | 114 | $daemons = $c->daemons; |
115 | 115 | foreach ($daemons->daemon as $d) { |
116 | 116 | if ((int)$d->disabled != 0) continue; |
117 | - $host = $d->host?(string)$d->host:$main_host; |
|
117 | + $host = $d->host ? (string)$d->host : $main_host; |
|
118 | 118 | if ($host != $web_host) { |
119 | 119 | $y = new StdClass; |
120 | 120 | $y->cmd = (string)$d->cmd; |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | $body = " |
29 | 29 | You are due for refresh on the following units from |
30 | 30 | "; |
31 | - foreach($user->refresh as $r) { |
|
31 | + foreach ($user->refresh as $r) { |
|
32 | 32 | } |
33 | 33 | } |
34 | 34 | |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | $rs = BoltRefresh::enum("due_time < $now"); |
38 | 38 | $users = array(); |
39 | 39 | |
40 | - foreach($rs as $r) { |
|
40 | + foreach ($rs as $r) { |
|
41 | 41 | $view = BoltView::lookup_id($r->view_id); |
42 | 42 | $user_id = $view->user_id; |
43 | 43 | if (!key_exists($user_id)) { |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | |
35 | 35 | start_table(); |
36 | 36 | |
37 | -switch($table){ |
|
37 | +switch ($table) { |
|
38 | 38 | case "platform": |
39 | 39 | break; |
40 | 40 | case "app": |
@@ -102,5 +102,5 @@ discard block |
||
102 | 102 | print_describe_table($table, 4); |
103 | 103 | |
104 | 104 | admin_page_tail(); |
105 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
105 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
106 | 106 | ?> |
@@ -55,5 +55,5 @@ |
||
55 | 55 | </form> |
56 | 56 | "; |
57 | 57 | admin_page_tail(); |
58 | -$cvs_version_tracker[]="\$Id$"; //Generated automatically - do not edit |
|
58 | +$cvs_version_tracker[] = "\$Id$"; //Generated automatically - do not edit |
|
59 | 59 | ?> |
@@ -71,9 +71,9 @@ |
||
71 | 71 | "; |
72 | 72 | start_table(); |
73 | 73 | row1("User settings"); |
74 | - $x = ($flags&BOLT_FLAGS_SHOW_ALL)?"checked":""; |
|
74 | + $x = ($flags&BOLT_FLAGS_SHOW_ALL) ? "checked" : ""; |
|
75 | 75 | row2("Show hidden courses?", "<input type=checkbox name=show_all $x>"); |
76 | - $x = ($flags&BOLT_FLAGS_DEBUG)?"checked":""; |
|
76 | + $x = ($flags&BOLT_FLAGS_DEBUG) ? "checked" : ""; |
|
77 | 77 | row2("Show debugging output?", "<input type=checkbox name=debug $x>"); |
78 | 78 | row2("", "<input class=\"btn btn-primary\" type=submit name=submit value=\"Update settings\">"); |
79 | 79 | end_table(); |
@@ -21,11 +21,11 @@ |
||
21 | 21 | // TODO: document - when/why would you want to do this? |
22 | 22 | // TODO: use new DB interface |
23 | 23 | |
24 | -include_once( "../inc/db.inc" ); |
|
25 | -include_once( "../inc/util.inc" ); |
|
26 | -include_once( "../inc/db_ops.inc" ); |
|
27 | -include_once( "../inc/util_ops.inc" ); |
|
28 | -include_once( "../inc/prefs.inc" ); |
|
24 | +include_once("../inc/db.inc"); |
|
25 | +include_once("../inc/util.inc"); |
|
26 | +include_once("../inc/db_ops.inc"); |
|
27 | +include_once("../inc/util_ops.inc"); |
|
28 | +include_once("../inc/prefs.inc"); |
|
29 | 29 | |
30 | 30 | db_init(); |
31 | 31 |