@@ -115,6 +115,10 @@ discard block |
||
115 | 115 | $db = BoincDb::get(); |
116 | 116 | return $db->enum('post', 'BoincPost', $clause); |
117 | 117 | } |
118 | + |
|
119 | + /** |
|
120 | + * @param string $query |
|
121 | + */ |
|
118 | 122 | static function enum_general($query) { |
119 | 123 | $db = BoincDb::get(); |
120 | 124 | return $db->enum_general('BoincPost', $query); |
@@ -175,6 +179,10 @@ discard block |
||
175 | 179 | $db = BoincDb::get(); |
176 | 180 | return $db->delete_aux('forum_preferences', "userid=$this->userid"); |
177 | 181 | } |
182 | + |
|
183 | + /** |
|
184 | + * @param string $clause |
|
185 | + */ |
|
178 | 186 | static function enum($clause=null) { |
179 | 187 | $db = BoincDb::get(); |
180 | 188 | return $db->enum('forum_preferences', 'BoincForumPrefs', $clause); |
@@ -290,6 +298,10 @@ discard block |
||
290 | 298 | } |
291 | 299 | |
292 | 300 | class BoincNotify { |
301 | + |
|
302 | + /** |
|
303 | + * @param string $clause |
|
304 | + */ |
|
293 | 305 | static function insert($clause) { |
294 | 306 | $db = BoincDb::get(); |
295 | 307 | $ret = $db->insert('notify', $clause); |
@@ -304,6 +316,10 @@ discard block |
||
304 | 316 | $db = BoincDb::get(); |
305 | 317 | return $db->enum('notify', 'BoincNotify', $clause); |
306 | 318 | } |
319 | + |
|
320 | + /** |
|
321 | + * @param integer $type |
|
322 | + */ |
|
307 | 323 | static function lookup($userid, $type, $opaque) { |
308 | 324 | $db = BoincDb::get(); |
309 | 325 | return $db->lookup('notify', 'BoincNotify', "userid=$userid and type=$type and opaque=$opaque"); |
@@ -316,6 +332,10 @@ discard block |
||
316 | 332 | $db = BoincDb::get(); |
317 | 333 | $db->delete_aux('notify', $clause); |
318 | 334 | } |
335 | + |
|
336 | + /** |
|
337 | + * @param string $query |
|
338 | + */ |
|
319 | 339 | static function enum_general($query) { |
320 | 340 | $db = BoincDb::get(); |
321 | 341 | return $db->enum_general('BoincNotify', $query); |
@@ -196,6 +196,10 @@ |
||
196 | 196 | |
197 | 197 | //////////////////// a banishment vote has been started /////////// |
198 | 198 | // |
199 | +/** |
|
200 | + * @param integer $duration |
|
201 | + * @param integer $end_time |
|
202 | + */ |
|
199 | 203 | function send_banish_vote_email($user, $duration, $reason, $end_time) { |
200 | 204 | global $master_url; |
201 | 205 | $now=time(); |
@@ -29,6 +29,9 @@ |
||
29 | 29 | return false; |
30 | 30 | } |
31 | 31 | |
32 | +/** |
|
33 | + * @param boolean $no_images |
|
34 | + */ |
|
32 | 35 | function show_forum_rss_item($thread, $userid, $threads_only, $no_images) { |
33 | 36 | $unique_url=secure_url_base()."forum_thread.php?id=".$thread->id; |
34 | 37 |
@@ -229,6 +229,9 @@ discard block |
||
229 | 229 | shmop_close ($shmid); |
230 | 230 | } |
231 | 231 | |
232 | +/** |
|
233 | + * @param GeoIP $gi |
|
234 | + */ |
|
232 | 235 | function _setup_segments($gi){ |
233 | 236 | $gi->databaseType = GEOIP_COUNTRY_EDITION; |
234 | 237 | $gi->record_length = STANDARD_RECORD_LENGTH; |
@@ -311,6 +314,10 @@ discard block |
||
311 | 314 | return $gi; |
312 | 315 | } |
313 | 316 | |
317 | +/** |
|
318 | + * @param string $filename |
|
319 | + * @param integer $flags |
|
320 | + */ |
|
314 | 321 | function geoip_open($filename, $flags) { |
315 | 322 | $gi = new GeoIP; |
316 | 323 | $gi->flags = $flags; |
@@ -419,6 +426,9 @@ discard block |
||
419 | 426 | return false; |
420 | 427 | } |
421 | 428 | |
429 | +/** |
|
430 | + * @param integer $ipnum |
|
431 | + */ |
|
422 | 432 | function _get_org($gi,$ipnum){ |
423 | 433 | $seek_org = _geoip_seek_country($gi,$ipnum); |
424 | 434 | if ($seek_org == $gi->databaseSegments) { |
@@ -443,6 +453,9 @@ discard block |
||
443 | 453 | return _get_org($gi, $ipnum); |
444 | 454 | } |
445 | 455 | |
456 | +/** |
|
457 | + * @param integer $ipnum |
|
458 | + */ |
|
446 | 459 | function _get_region($gi,$ipnum){ |
447 | 460 | if ($gi->databaseType == GEOIP_REGION_EDITION_REV0){ |
448 | 461 | $seek_region = _geoip_seek_country($gi,$ipnum) - GEOIP_STATE_BEGIN_REV0; |
@@ -324,6 +324,11 @@ discard block |
||
324 | 324 | // so it's OK to show the domain name etc. |
325 | 325 | // If private is false, show the owner's name only if they've given permission |
326 | 326 | // |
327 | +/** |
|
328 | + * @param integer $i |
|
329 | + * @param boolean $show_owner |
|
330 | + * @param boolean $any_product_name |
|
331 | + */ |
|
327 | 332 | function show_host_row($host, $i, $private, $show_owner, $any_product_name) { |
328 | 333 | $anonymous = false; |
329 | 334 | if (!$private) { |
@@ -503,6 +508,9 @@ discard block |
||
503 | 508 | // that their time intervals are disjoint. |
504 | 509 | // So the CPU/OS checks don't have to be very strict. |
505 | 510 | // |
511 | +/** |
|
512 | + * @param boolean $show_detail |
|
513 | + */ |
|
506 | 514 | function hosts_compatible($host1, $host2, $show_detail) { |
507 | 515 | // A host is "new" if it has no credit and no results. |
508 | 516 | // Skip disjoint-time check if one host or other is new |
@@ -642,6 +650,9 @@ discard block |
||
642 | 650 | return "hosts_user.php?sort=$sort&rev=$rev&show_all=$show_all$x"; |
643 | 651 | } |
644 | 652 | |
653 | +/** |
|
654 | + * @param string $sort |
|
655 | + */ |
|
645 | 656 | function link_url_rev($actual_sort, $sort, $rev, $show_all) { |
646 | 657 | if ($actual_sort == $sort) { |
647 | 658 | $rev = 1 - $rev; |
@@ -661,6 +672,9 @@ discard block |
||
661 | 672 | echo "<p>"; |
662 | 673 | } |
663 | 674 | |
675 | +/** |
|
676 | + * @param boolean $any_product_name |
|
677 | + */ |
|
664 | 678 | function user_host_table_start( |
665 | 679 | $private, $sort, $rev, $show_all, $any_product_name |
666 | 680 | ) { |
@@ -65,6 +65,10 @@ |
||
65 | 65 | return $forum->parent_type == 0 && ($forum->title === $forum_name); |
66 | 66 | } |
67 | 67 | |
68 | +/** |
|
69 | + * @param integer $start |
|
70 | + * @param integer $count |
|
71 | + */ |
|
68 | 72 | function show_news($start, $count) { |
69 | 73 | $forum = news_forum(); |
70 | 74 | if (!$forum) { |
@@ -291,6 +291,9 @@ discard block |
||
291 | 291 | return $dp; |
292 | 292 | } |
293 | 293 | |
294 | +/** |
|
295 | + * @param string $t |
|
296 | + */ |
|
294 | 297 | function group_header($t) { |
295 | 298 | echo "<tr><th class=\"bg-info\">$t</th><td class=\"bg-info\" colspan=4><br></td></tr>\n"; |
296 | 299 | } |
@@ -413,6 +416,9 @@ discard block |
||
413 | 416 | |
414 | 417 | // Display all venues as columns next to descriptions |
415 | 418 | // |
419 | +/** |
|
420 | + * @param stdClass $prefs |
|
421 | + */ |
|
416 | 422 | function prefs_show_columns_global($prefs) { |
417 | 423 | global $cpu_prefs; |
418 | 424 | global $disk_prefs; |
@@ -483,6 +489,11 @@ discard block |
||
483 | 489 | return PROJECT; |
484 | 490 | } |
485 | 491 | |
492 | +/** |
|
493 | + * @param stdClass $prefs |
|
494 | + * @param string $venue |
|
495 | + * @param string $subset |
|
496 | + */ |
|
486 | 497 | function prefs_display_venue($prefs, $venue, $subset) { |
487 | 498 | global $g_logged_in_user; |
488 | 499 | $tokens = url_tokens($g_logged_in_user->authenticator); |
@@ -241,6 +241,9 @@ |
||
241 | 241 | } |
242 | 242 | } |
243 | 243 | |
244 | +/** |
|
245 | + * @param boolean $columns |
|
246 | + */ |
|
244 | 247 | function prefs_show_privacy($user, $columns) { |
245 | 248 | global $privacy_pref_descs; |
246 | 249 | if ($columns) { |
@@ -440,6 +440,10 @@ discard block |
||
440 | 440 | } |
441 | 441 | } |
442 | 442 | |
443 | +/** |
|
444 | + * @param string $id |
|
445 | + * @param string $d |
|
446 | + */ |
|
443 | 447 | function hour_select($x, $name, $id, $d) { |
444 | 448 | $s = ""; |
445 | 449 | $s .= "<select class=\"selectbox form-control input-sm\" name=$name id=$id $d>\n"; |
@@ -533,6 +537,9 @@ discard block |
||
533 | 537 | |
534 | 538 | // display preference subsets as columns |
535 | 539 | // |
540 | +/** |
|
541 | + * @param string $x |
|
542 | + */ |
|
536 | 543 | function row_top($x) { |
537 | 544 | echo "<tr class=\"bg-primary\"><th width=35%>$x</th>"; |
538 | 545 | echo "<th ><b>".tra("Default")."</b></th> |
@@ -545,6 +552,13 @@ discard block |
||
545 | 552 | |
546 | 553 | // row_defs - Display a value for all 4 venues in one row |
547 | 554 | // |
555 | +/** |
|
556 | + * @param string $pre |
|
557 | + * @param string $item |
|
558 | + * @param string $post |
|
559 | + * @param string $type |
|
560 | + * @param string $tooltip |
|
561 | + */ |
|
548 | 562 | function row_defs($pre, $item, $post, $type, $prefs, $tooltip=null) { |
549 | 563 | $gen = $prefs->$item; |
550 | 564 | $hom = (isset($prefs->home) && isset($prefs->home->$item)) ? $prefs->home->$item : "--"; |
@@ -599,6 +613,9 @@ discard block |
||
599 | 613 | // |
600 | 614 | // row_links - Display Edit/Add/Remove links for all venues in 1 row |
601 | 615 | // |
616 | +/** |
|
617 | + * @param string $subset |
|
618 | + */ |
|
602 | 619 | function row_links($subset, $prefs) { |
603 | 620 | global $g_logged_in_user; |
604 | 621 | $tokens = url_tokens($g_logged_in_user->authenticator); |