@@ -66,6 +66,9 @@ |
||
66 | 66 | // $x is an array of result/host objects; |
67 | 67 | // return the variance among claimed credits given an FP weight |
68 | 68 | // |
69 | +/** |
|
70 | + * @param double $fpw |
|
71 | + */ |
|
69 | 72 | function fpw_var($results, $fpw) { |
70 | 73 | $cc = array(); |
71 | 74 | foreach ($results as $r) { |
@@ -65,6 +65,9 @@ |
||
65 | 65 | return $running; |
66 | 66 | } |
67 | 67 | |
68 | +/** |
|
69 | + * @param boolean $running |
|
70 | + */ |
|
68 | 71 | function show_status($host, $function, $running) { |
69 | 72 | echo "<tr><td>$function</td><td>$host</td>"; |
70 | 73 | if ($running) { |
@@ -12,6 +12,9 @@ |
||
12 | 12 | // insert "\n</venue>\n" before "</global_preferences>" |
13 | 13 | // This fixes an XML error introduced at some point in the past |
14 | 14 | // |
15 | +/** |
|
16 | + * @return string |
|
17 | + */ |
|
15 | 18 | function repair_prefs($prefs) { |
16 | 19 | if (strstr($prefs, '\"')) { |
17 | 20 | return str_replace('\"', '"', $prefs); |
@@ -24,12 +24,18 @@ |
||
24 | 24 | |
25 | 25 | db_init(); |
26 | 26 | |
27 | +/** |
|
28 | + * @param string $tag |
|
29 | + */ |
|
27 | 30 | function parse_num($xml, $tag) { |
28 | 31 | $x = parse_element($xml, $tag); |
29 | 32 | if (!$x) return 0; |
30 | 33 | return $x; |
31 | 34 | } |
32 | 35 | |
36 | +/** |
|
37 | + * @param string $tag |
|
38 | + */ |
|
33 | 39 | function parse_boolint($xml, $tag) { |
34 | 40 | $x = parse_bool($xml, $tag); |
35 | 41 | if ($x) return 1; |
@@ -231,6 +231,9 @@ discard block |
||
231 | 231 | } |
232 | 232 | } |
233 | 233 | |
234 | +/** |
|
235 | + * @param resource $log |
|
236 | + */ |
|
234 | 237 | function do_batch($startid, $n, $log) { |
235 | 238 | $result = _mysql_query( |
236 | 239 | "select * from user where id>$startid order by id limit $n" |
@@ -245,6 +248,9 @@ discard block |
||
245 | 248 | return $startid; |
246 | 249 | } |
247 | 250 | |
251 | +/** |
|
252 | + * @param resource $log |
|
253 | + */ |
|
248 | 254 | function do_one($thisid, $log) { |
249 | 255 | $result = _mysql_query( |
250 | 256 | "select * from user where id=$thisid" |
@@ -39,6 +39,9 @@ |
||
39 | 39 | BoincNotify::delete_aux("create_time < $t"); |
40 | 40 | } |
41 | 41 | |
42 | +/** |
|
43 | + * @param string $message |
|
44 | + */ |
|
42 | 45 | function send_notify_email($userid, $message) { |
43 | 46 | $user = BoincUser::lookup_id($userid); |
44 | 47 | $subject = "Daily notification summary from ".PROJECT; |
@@ -41,6 +41,9 @@ discard block |
||
41 | 41 | |
42 | 42 | // see if a web server is running at the given URL |
43 | 43 | // |
44 | +/** |
|
45 | + * @param string $url |
|
46 | + */ |
|
44 | 47 | function web_server_running($url) { |
45 | 48 | $u = parse_url($url); |
46 | 49 | $url = $u['scheme']."://".$u['host']; |
@@ -56,6 +59,9 @@ discard block |
||
56 | 59 | |
57 | 60 | // see if the given daemon is running on the host by checking its PID |
58 | 61 | // |
62 | +/** |
|
63 | + * @param string $host |
|
64 | + */ |
|
59 | 65 | function is_daemon_running($host, $d) { |
60 | 66 | if ($d->pid_file) { |
61 | 67 | $path = "../../pid_$host/".(string)$d->pid_file; |
@@ -107,10 +107,18 @@ |
||
107 | 107 | } |
108 | 108 | } |
109 | 109 | |
110 | +/** |
|
111 | + * @param integer $i |
|
112 | + * |
|
113 | + * @return string |
|
114 | + */ |
|
110 | 115 | function app_version_dir($app_name, $i, $platform) { |
111 | 116 | return "apps/$app_name/1.$i/$platform"; |
112 | 117 | } |
113 | 118 | |
119 | +/** |
|
120 | + * @param integer $i |
|
121 | + */ |
|
114 | 122 | function make_app_version_dir($app_name, $i, $platform) { |
115 | 123 | @mkdir("apps/$app_name"); |
116 | 124 | @mkdir("apps/$app_name/1.$i"); |
@@ -58,6 +58,9 @@ |
||
58 | 58 | return $x; |
59 | 59 | } |
60 | 60 | |
61 | +/** |
|
62 | + * @param resource $f |
|
63 | + */ |
|
61 | 64 | function handle_team($team, $f) { |
62 | 65 | echo "Team: $team->name\n"; |
63 | 66 | $user = BoincUser::lookup_id($team->userid); |