@@ -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); |
@@ -88,6 +88,9 @@ discard block |
||
88 | 88 | return null; |
89 | 89 | } |
90 | 90 | |
91 | +/** |
|
92 | + * @param stdClass $t |
|
93 | + */ |
|
91 | 94 | function valid_team($t) { |
92 | 95 | if (!$t->id) return false; |
93 | 96 | if (!$t->name) return false; |
@@ -96,6 +99,9 @@ discard block |
||
96 | 99 | return true; |
97 | 100 | } |
98 | 101 | |
102 | +/** |
|
103 | + * @param stdClass $t |
|
104 | + */ |
|
99 | 105 | function update_team($t, $team, $user) { |
100 | 106 | global $dry_run; |
101 | 107 | if ( |
@@ -126,6 +132,9 @@ discard block |
||
126 | 132 | } |
127 | 133 | } |
128 | 134 | |
135 | +/** |
|
136 | + * @param stdClass $t |
|
137 | + */ |
|
129 | 138 | function insert_case($t, $user) { |
130 | 139 | global $master_url; |
131 | 140 | global $dry_run; |
@@ -98,6 +98,9 @@ discard block |
||
98 | 98 | // Generates a standard set of links between associated multi-page documents. |
99 | 99 | // All linked files must be of the form "$filename_<page number>.html". |
100 | 100 | |
101 | +/** |
|
102 | + * @param integer $currPageNum |
|
103 | + */ |
|
101 | 104 | function write_page_links($filename, $currPageNum, $numPages) { |
102 | 105 | echo "<p>Page $currPageNum of $numPages</p>"; |
103 | 106 | |
@@ -332,6 +335,11 @@ discard block |
||
332 | 335 | // A generalized function to produce some number of pages summarizing a |
333 | 336 | // set of user profiles. |
334 | 337 | |
338 | +/** |
|
339 | + * @param integer $rowsPerPage |
|
340 | + * @param integer $colsPerPage |
|
341 | + * @param string $dir |
|
342 | + */ |
|
335 | 343 | function build_profile_pages( |
336 | 344 | $members, $title, $rowsPerPage, $colsPerPage, $dir, $base_filename |
337 | 345 | ) { |
@@ -23,6 +23,9 @@ |
||
23 | 23 | $cli_only = true; |
24 | 24 | include_once("util_ops.inc"); |
25 | 25 | |
26 | +/** |
|
27 | + * @param string $x |
|
28 | + */ |
|
26 | 29 | function fail($x) { |
27 | 30 | $f = fopen("error_log", "a"); |
28 | 31 | if (!$f) return false; |
@@ -108,6 +108,10 @@ discard block |
||
108 | 108 | // If you include any links, prepend URL with $prefix |
109 | 109 | // if you need to open divs here close them in project_footer() |
110 | 110 | // |
111 | +/** |
|
112 | + * @param string $prefix |
|
113 | + * @param boolean $is_main |
|
114 | + */ |
|
111 | 115 | function project_banner($title, $prefix, $is_main) { |
112 | 116 | if ($is_main) { |
113 | 117 | echo '<img class="img-responsive" src="img/water.jpg">'; |
@@ -119,6 +123,11 @@ discard block |
||
119 | 123 | } |
120 | 124 | //$fixed_navbar = true; |
121 | 125 | |
126 | +/** |
|
127 | + * @param boolean $show_return |
|
128 | + * @param boolean $show_date |
|
129 | + * @param string $prefix |
|
130 | + */ |
|
122 | 131 | function project_footer($show_return, $show_date, $prefix) { |
123 | 132 | // If you include any links, prepend URL with $prefix |
124 | 133 | // |
@@ -32,6 +32,9 @@ discard block |
||
32 | 32 | // Parse form variables into XML, and return it. |
33 | 33 | // Also error-check values, and return errors in $errors->* |
34 | 34 | |
35 | +/** |
|
36 | + * @param string $name |
|
37 | + */ |
|
35 | 38 | function option($name, $val) { |
36 | 39 | $x = ($name == $val) ? "selected" : ""; |
37 | 40 | return "<option name='$name' $x>$name\n"; |
@@ -90,6 +93,10 @@ discard block |
||
90 | 93 | return $x; |
91 | 94 | } |
92 | 95 | |
96 | +/** |
|
97 | + * @param string $name |
|
98 | + * @param integer $max |
|
99 | + */ |
|
93 | 100 | function number_select($name, $max, $n) { |
94 | 101 | $sel = ($n == 0) ? "selected":""; |
95 | 102 | $x = "<select class=\"form-control input-sm\" name=$name> <option value=0 $sel>".tra("No limit")."</option>"; |
@@ -106,6 +113,9 @@ discard block |
||
106 | 113 | return tra("No limit"); |
107 | 114 | } |
108 | 115 | |
116 | +/** |
|
117 | + * @param stdClass $prefs |
|
118 | + */ |
|
109 | 119 | function project_specific_prefs_edit($prefs, $error=false) { |
110 | 120 | global $app_array; |
111 | 121 | if (COLOR_PREFS) { |
@@ -162,6 +172,9 @@ discard block |
||
162 | 172 | } |
163 | 173 | } |
164 | 174 | |
175 | +/** |
|
176 | + * @param boolean $error |
|
177 | + */ |
|
165 | 178 | function project_specific_prefs_parse_form(&$error) { |
166 | 179 | global $app_array; |
167 | 180 | $x = ""; |
@@ -216,6 +229,9 @@ discard block |
||
216 | 229 | return $x; |
217 | 230 | } |
218 | 231 | |
232 | +/** |
|
233 | + * @param stdClass $prefs |
|
234 | + */ |
|
219 | 235 | function project_specific_prefs_show($prefs, $columns=false) { |
220 | 236 | global $app_array; |
221 | 237 | if ($columns) { |
@@ -28,6 +28,9 @@ discard block |
||
28 | 28 | require_once("../inc/bolt_util.inc"); |
29 | 29 | require_once("../inc/util.inc"); |
30 | 30 | |
31 | +/** |
|
32 | + * @param string $tag |
|
33 | + */ |
|
31 | 34 | function debug_show_state($state, $tag) { |
32 | 35 | global $user; |
33 | 36 | global $refresh; |
@@ -82,6 +85,9 @@ discard block |
||
82 | 85 | |
83 | 86 | // A page is being shown to the user; make a record of it |
84 | 87 | // |
88 | +/** |
|
89 | + * @param integer $mode |
|
90 | + */ |
|
85 | 91 | function create_view($iter, $mode, $prev_view_id) { |
86 | 92 | global $user; |
87 | 93 | global $course; |
@@ -31,6 +31,10 @@ discard block |
||
31 | 31 | // If $selection is provided, and if it matches one of the entries in the file, |
32 | 32 | // it will be selected by default. |
33 | 33 | // |
34 | +/** |
|
35 | + * @param string $name |
|
36 | + * @param string $filename |
|
37 | + */ |
|
34 | 38 | function show_combo_box($name, $filename, $selection=null) { |
35 | 39 | echo "<select name=\"$name\" class=\"form-control\">\n"; |
36 | 40 | |
@@ -185,6 +189,9 @@ discard block |
||
185 | 189 | show_language_selection($profile); |
186 | 190 | } |
187 | 191 | |
192 | +/** |
|
193 | + * @param string $name |
|
194 | + */ |
|
188 | 195 | function show_textarea($name, $text) { |
189 | 196 | rowify("<textarea name=\"$name\" class=\"form-control\" rows=\"10\">" . $text . "</textarea>"); |
190 | 197 | } |
@@ -311,6 +318,9 @@ discard block |
||
311 | 318 | page_tail(); |
312 | 319 | } |
313 | 320 | |
321 | +/** |
|
322 | + * @param string $warning |
|
323 | + */ |
|
314 | 324 | function show_profile_form($profile, $warning=null) { |
315 | 325 | if ($profile) { |
316 | 326 | page_head(tra("Edit your profile"), null, null, null, boinc_recaptcha_get_head_extra()); |