@@ -205,6 +205,10 @@ |
||
205 | 205 | return 0; |
206 | 206 | } |
207 | 207 | |
208 | +/** |
|
209 | + * @param string $file |
|
210 | + * @param string $type |
|
211 | + */ |
|
208 | 212 | function parse_file($file, $date, $type, &$out) { |
209 | 213 | global $cats, $names; |
210 | 214 | preg_match_all('#<regmem personid="uk.org.publicwhip/person/(.*?)" (?:memberid="(.*?)" )?membername="(.*?)" date="(.*?)">(.*?)</regmem>#s', $file, $mm, PREG_SET_ORDER); |
@@ -342,6 +342,9 @@ discard block |
||
342 | 342 | echo '</ul></div>'; |
343 | 343 | } |
344 | 344 | |
345 | +/** |
|
346 | + * @param integer $limit |
|
347 | + */ |
|
345 | 348 | function display_league($limit, $q = '') { |
346 | 349 | global $THEUSER; |
347 | 350 | $db = new ParlDB; |
@@ -468,6 +471,9 @@ discard block |
||
468 | 471 | echo '</ol>'; |
469 | 472 | } |
470 | 473 | |
474 | +/** |
|
475 | + * @param integer $count |
|
476 | + */ |
|
471 | 477 | function disp_speech($row, $count) { |
472 | 478 | echo '<li'; |
473 | 479 | if ($row['htype']==13) echo ' class="unspoken"'; |
@@ -95,6 +95,10 @@ discard block |
||
95 | 95 | // Getting page and section metadata |
96 | 96 | // $page/$section is a page name. |
97 | 97 | // $key is the element of metadata you want to retrieve. |
98 | + |
|
99 | + /** |
|
100 | + * @param string $key |
|
101 | + */ |
|
98 | 102 | public function page_metadata($page, $key) { |
99 | 103 | return $this->_get_metadata(array("page"=>$page, "key"=>$key), "page"); |
100 | 104 | } |
@@ -145,6 +149,10 @@ discard block |
||
145 | 149 | /////////////////////////////////////// |
146 | 150 | |
147 | 151 | // Only accessed through page_metadata() or section_metadata() |
152 | + |
|
153 | + /** |
|
154 | + * @param string $type |
|
155 | + */ |
|
148 | 156 | public function _get_metadata($args="", $type) { |
149 | 157 | // $type is either 'page' or 'section' |
150 | 158 | global $this_page, $this_section; |
@@ -51,6 +51,10 @@ discard block |
||
51 | 51 | |
52 | 52 | // FUNCTION: fetch_between |
53 | 53 | |
54 | + /** |
|
55 | + * @param integer $confirmed |
|
56 | + * @param integer $deleted |
|
57 | + */ |
|
54 | 58 | public function fetch_between($confirmed, $deleted, $start_date, $end_date) { |
55 | 59 | // Return summary data on all the alerts that were created between $start_date |
56 | 60 | // and $end_date (inclusive) and whose confirmed and deleted values match the booleans |
@@ -79,6 +83,10 @@ discard block |
||
79 | 83 | |
80 | 84 | // FUNCTION: fetch |
81 | 85 | |
86 | + /** |
|
87 | + * @param integer $confirmed |
|
88 | + * @param integer $deleted |
|
89 | + */ |
|
82 | 90 | public function fetch($confirmed, $deleted) { |
83 | 91 | // Pass it an alert id and it will fetch data about alerts from the db |
84 | 92 | // and put it all in the appropriate variables. |
@@ -320,6 +328,9 @@ discard block |
||
320 | 328 | } |
321 | 329 | } |
322 | 330 | |
331 | + /** |
|
332 | + * @param string $email |
|
333 | + */ |
|
323 | 334 | public function email_exists($email) { |
324 | 335 | // Returns true if there's a user with this email address. |
325 | 336 |
@@ -44,6 +44,9 @@ |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | |
47 | + /** |
|
48 | + * @param string $view |
|
49 | + */ |
|
47 | 50 | public function display ($view, $args=array(), $format='html') { |
48 | 51 | // $view is what we're viewing by: |
49 | 52 | // 'ep' is all the comments attached to an epobject. |
@@ -114,6 +114,9 @@ discard block |
||
114 | 114 | |
115 | 115 | |
116 | 116 | |
117 | + /** |
|
118 | + * @param string $view |
|
119 | + */ |
|
117 | 120 | public function display ($view, $args=array(), $format='html') { |
118 | 121 | |
119 | 122 | // $view is what we're viewing by: |
@@ -726,6 +729,10 @@ discard block |
||
726 | 729 | |
727 | 730 | } |
728 | 731 | |
732 | + /** |
|
733 | + * @param string $from |
|
734 | + * @param string $to |
|
735 | + */ |
|
729 | 736 | private function check_gid_change($gid, $from, $to) { |
730 | 737 | $input = array ( |
731 | 738 | 'amount' => array ( |
@@ -1610,6 +1617,9 @@ discard block |
||
1610 | 1617 | |
1611 | 1618 | } |
1612 | 1619 | |
1620 | + /** |
|
1621 | + * @param string $spid |
|
1622 | + */ |
|
1613 | 1623 | public function _get_mentions($spid) { |
1614 | 1624 | $result = array(); |
1615 | 1625 | $q = $this->db->query("select gid, type, date, url, mentioned_gid |
@@ -2622,6 +2632,9 @@ discard block |
||
2622 | 2632 | public $commentspage = 'spwrans'; |
2623 | 2633 | public $gidprefix = 'uk.org.publicwhip/spwa/'; |
2624 | 2634 | |
2635 | + /** |
|
2636 | + * @return string |
|
2637 | + */ |
|
2625 | 2638 | public function get_gid_from_spid($spid) { |
2626 | 2639 | // Fix the common errors of S.0 instead of S.O and leading |
2627 | 2640 | // zeros in the numbers: |
@@ -307,6 +307,9 @@ discard block |
||
307 | 307 | $this->valid = true; |
308 | 308 | } |
309 | 309 | |
310 | + /** |
|
311 | + * @param boolean $long |
|
312 | + */ |
|
310 | 313 | public function query_description_internal($long) { |
311 | 314 | if (!defined('XAPIANDB') || !XAPIANDB) { |
312 | 315 | return ''; |
@@ -341,6 +344,11 @@ discard block |
||
341 | 344 | } |
342 | 345 | |
343 | 346 | // Perform partial query to get a count of number of matches |
347 | + |
|
348 | + /** |
|
349 | + * @param integer $first_result |
|
350 | + * @param integer $results_per_page |
|
351 | + */ |
|
344 | 352 | public function run_count($first_result, $results_per_page, $sort_order='relevance') { |
345 | 353 | if (!defined('XAPIANDB') || !XAPIANDB) |
346 | 354 | return null; |
@@ -420,6 +428,11 @@ discard block |
||
420 | 428 | } |
421 | 429 | |
422 | 430 | // Perform the full search... |
431 | + |
|
432 | + /** |
|
433 | + * @param integer $first_result |
|
434 | + * @param integer $results_per_page |
|
435 | + */ |
|
423 | 436 | public function run_search($first_result, $results_per_page, $sort_order='relevance') { |
424 | 437 | $start = getmicrotime(); |
425 | 438 |
@@ -99,6 +99,9 @@ |
||
99 | 99 | return $popular_searches; |
100 | 100 | } |
101 | 101 | |
102 | + /** |
|
103 | + * @param integer $row |
|
104 | + */ |
|
102 | 105 | public function _db_row_to_array($q, $row) { |
103 | 106 | $query = $q->field($row, 'query_string'); |
104 | 107 | $this->SEARCHURL->insert(array('s'=>$query, 'pop'=>1)); |
@@ -975,6 +975,9 @@ discard block |
||
975 | 975 | } |
976 | 976 | |
977 | 977 | |
978 | + /** |
|
979 | + * @param string $expire |
|
980 | + */ |
|
978 | 981 | public function login($returl="", $expire) { |
979 | 982 | |
980 | 983 | // This is used to log the user in. Duh. |
@@ -1048,6 +1051,9 @@ discard block |
||
1048 | 1051 | } |
1049 | 1052 | } |
1050 | 1053 | |
1054 | + /** |
|
1055 | + * @param string $token |
|
1056 | + */ |
|
1051 | 1057 | public function confirm_email($token, $redirect=true) { |
1052 | 1058 | $arg = ''; |
1053 | 1059 | if (strstr($token, '::')) $arg = '::'; |