@@ -556,7 +556,7 @@ |
||
| 556 | 556 | /** |
| 557 | 557 | * Return the with the passed ID (via URL parameters) or the current user |
| 558 | 558 | * |
| 559 | - * @return null|Member Returns the member object or NULL if the member |
|
| 559 | + * @return DataObject|null Returns the member object or NULL if the member |
|
| 560 | 560 | * was not found |
| 561 | 561 | */ |
| 562 | 562 | function Member() { |
@@ -3,6 +3,9 @@ |
||
| 3 | 3 | class CheckableOption extends CompositeField { |
| 4 | 4 | protected $childField, $checkbox; |
| 5 | 5 | |
| 6 | + /** |
|
| 7 | + * @param string $checkName |
|
| 8 | + */ |
|
| 6 | 9 | function __construct($checkName, $childField, $value = "", $readonly = false) { |
| 7 | 10 | $this->name = $checkName; |
| 8 | 11 | $this->checkbox = new CheckboxField($checkName, "", $value); |
@@ -28,6 +28,10 @@ |
||
| 28 | 28 | return i18n::get_locale(); |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | + /** |
|
| 32 | + * @param string $name |
|
| 33 | + * @param string $title |
|
| 34 | + */ |
|
| 31 | 35 | function __construct($name, $title = null, $source = null, $value = "", $form=null) { |
| 32 | 36 | if(!is_array($source)) { |
| 33 | 37 | // Get a list of countries from Zend |
@@ -143,7 +143,7 @@ |
||
| 143 | 143 | * Check if they have visited this thread before. If they haven't increment |
| 144 | 144 | * the NumViews value by 1 and set visited to true. |
| 145 | 145 | * |
| 146 | - * @return void |
|
| 146 | + * @return false|null |
|
| 147 | 147 | */ |
| 148 | 148 | public function incNumViews() { |
| 149 | 149 | if(Session::get('ForumViewed-' . $this->ID)) return false; |
@@ -219,7 +219,7 @@ discard block |
||
| 219 | 219 | /** |
| 220 | 220 | * Get the number of total posts |
| 221 | 221 | * |
| 222 | - * @return int Returns the number of posts |
|
| 222 | + * @return string Returns the number of posts |
|
| 223 | 223 | */ |
| 224 | 224 | public function getNumPosts() { |
| 225 | 225 | $sqlQuery = new SQLQuery(); |
@@ -236,7 +236,7 @@ discard block |
||
| 236 | 236 | /** |
| 237 | 237 | * Get the number of total topics (threads) |
| 238 | 238 | * |
| 239 | - * @return int Returns the number of topics (threads) |
|
| 239 | + * @return string Returns the number of topics (threads) |
|
| 240 | 240 | */ |
| 241 | 241 | function getNumTopics() { |
| 242 | 242 | $sqlQuery = new SQLQuery(); |
@@ -253,7 +253,7 @@ discard block |
||
| 253 | 253 | /** |
| 254 | 254 | * Get the number of distinct authors |
| 255 | 255 | * |
| 256 | - * @return int Returns the number of distinct authors |
|
| 256 | + * @return string Returns the number of distinct authors |
|
| 257 | 257 | */ |
| 258 | 258 | public function getNumAuthors() { |
| 259 | 259 | $sqlQuery = new SQLQuery(); |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | |
| 349 | 349 | /** |
| 350 | 350 | * Get a list of Forum Categories |
| 351 | - * @return DataList |
|
| 351 | + * @return boolean |
|
| 352 | 352 | */ |
| 353 | 353 | function getShowInCategories() { |
| 354 | 354 | $forumCategories = ForumCategory::get()->filter('ForumHolderID', $this->ID); |
@@ -495,8 +495,9 @@ discard block |
||
| 495 | 495 | * it (keys: 'last_id', 'last_created') |
| 496 | 496 | * @param int $lastVisit Unix timestamp of the last visit (GMT) |
| 497 | 497 | * @param int $lastPostID ID of the last read post |
| 498 | - * @param int $thread ID of the relevant topic (set to NULL for all |
|
| 498 | + * @param integer $threadID ID of the relevant topic (set to NULL for all |
|
| 499 | 499 | * topics) |
| 500 | + * @param integer $forumID |
|
| 500 | 501 | * @return bool Returns TRUE if there are new posts available, otherwise |
| 501 | 502 | * FALSE. |
| 502 | 503 | */ |
@@ -354,7 +354,7 @@ discard block |
||
| 354 | 354 | /** |
| 355 | 355 | * Get the number of total topics (threads) in this Forum |
| 356 | 356 | * |
| 357 | - * @return int Returns the number of topics (threads) |
|
| 357 | + * @return string Returns the number of topics (threads) |
|
| 358 | 358 | */ |
| 359 | 359 | function getNumTopics() { |
| 360 | 360 | $sqlQuery = new SQLQuery(); |
@@ -369,7 +369,7 @@ discard block |
||
| 369 | 369 | /** |
| 370 | 370 | * Get the number of total posts |
| 371 | 371 | * |
| 372 | - * @return int Returns the number of posts |
|
| 372 | + * @return string Returns the number of posts |
|
| 373 | 373 | */ |
| 374 | 374 | function getNumPosts() { |
| 375 | 375 | $sqlQuery = new SQLQuery(); |
@@ -385,7 +385,7 @@ discard block |
||
| 385 | 385 | /** |
| 386 | 386 | * Get the number of distinct Authors |
| 387 | 387 | * |
| 388 | - * @return int |
|
| 388 | + * @return string |
|
| 389 | 389 | */ |
| 390 | 390 | function getNumAuthors() { |
| 391 | 391 | $sqlQuery = new SQLQuery(); |
@@ -399,7 +399,7 @@ discard block |
||
| 399 | 399 | |
| 400 | 400 | /** |
| 401 | 401 | * Returns the Topics (the first Post of each Thread) for this Forum |
| 402 | - * @return DataList |
|
| 402 | + * @return PaginatedList |
|
| 403 | 403 | */ |
| 404 | 404 | public function getTopics() { |
| 405 | 405 | // Get a list of Posts |
@@ -598,7 +598,7 @@ discard block |
||
| 598 | 598 | * |
| 599 | 599 | * Designed to be called via AJAX so return true / false |
| 600 | 600 | * |
| 601 | - * @return bool |
|
| 601 | + * @return null|false |
|
| 602 | 602 | */ |
| 603 | 603 | public function unsubscribe(SS_HTTPRequest $request) { |
| 604 | 604 | $member = Member::currentUser(); |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | /** |
| 721 | 721 | * Get posts to display. This method assumes an URL parameter "ID" which contains the thread ID. |
| 722 | 722 | * @param string sortDirection The sort order direction, either ASC for ascending (default) or DESC for descending |
| 723 | - * @return DataObjectSet Posts |
|
| 723 | + * @return PaginatedList Posts |
|
| 724 | 724 | */ |
| 725 | 725 | function Posts($sortDirection = "ASC") { |
| 726 | 726 | $numPerPage = Forum::$posts_per_page; |
@@ -771,7 +771,7 @@ discard block |
||
| 771 | 771 | /** |
| 772 | 772 | * Get the usable BB codes |
| 773 | 773 | * |
| 774 | - * @return DataObjectSet Returns the usable BB codes |
|
| 774 | + * @return ArrayList Returns the usable BB codes |
|
| 775 | 775 | * @see BBCodeParser::usable_tags() |
| 776 | 776 | */ |
| 777 | 777 | function BBTags() { |
@@ -1053,6 +1053,8 @@ discard block |
||
| 1053 | 1053 | |
| 1054 | 1054 | /** |
| 1055 | 1055 | * Send email to moderators notifying them the thread has been created or post added/edited. |
| 1056 | + * @param DataObject $post |
|
| 1057 | + * @param DataObject $thread |
|
| 1056 | 1058 | */ |
| 1057 | 1059 | function notifyModerators($post, $thread, $starting_thread = false) { |
| 1058 | 1060 | $moderators = $this->Moderators(); |
@@ -1377,6 +1379,10 @@ discard block |
||
| 1377 | 1379 | * TODO: Remove once API in core |
| 1378 | 1380 | */ |
| 1379 | 1381 | class Forum_DataQuery extends DataQuery { |
| 1382 | + |
|
| 1383 | + /** |
|
| 1384 | + * @param string $dataClass |
|
| 1385 | + */ |
|
| 1380 | 1386 | function __construct($dataClass, $query) { |
| 1381 | 1387 | parent::__construct($dataClass); |
| 1382 | 1388 | $this->query = $query; |