Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -24,8 +24,8 @@ |
25 | 25 | /** |
26 | 26 | * Construct a new HistoryPage. |
27 | 27 | * |
28 | | - * @param Article $article |
29 | | - * @returns nothing |
| 28 | + * @param $article Article |
| 29 | + * @return nothing |
30 | 30 | */ |
31 | 31 | function __construct( $article ) { |
32 | 32 | global $wgUser; |
— | — | @@ -60,7 +60,7 @@ |
61 | 61 | /** |
62 | 62 | * Print the history page for an article. |
63 | 63 | * |
64 | | - * @returns nothing |
| 64 | + * @return nothing |
65 | 65 | */ |
66 | 66 | function history() { |
67 | 67 | global $wgOut, $wgRequest, $wgScript; |
— | — | @@ -180,8 +180,13 @@ |
181 | 181 | * Fetch an array of revisions, specified by a given limit, offset and |
182 | 182 | * direction. This is now only used by the feeds. It was previously |
183 | 183 | * used by the main UI but that's now handled by the pager. |
| 184 | + * |
| 185 | + * @param $limit Integer: the limit number of revisions to get |
| 186 | + * @param $offset Integer |
| 187 | + * @param $direction Integer: either HistoryPage::DIR_PREV or HistoryPage::DIR_NEXT |
| 188 | + * @return ResultWrapper |
184 | 189 | */ |
185 | | - function fetchRevisions($limit, $offset, $direction) { |
| 190 | + function fetchRevisions( $limit, $offset, $direction ) { |
186 | 191 | $dbr = wfGetDB( DB_SLAVE ); |
187 | 192 | |
188 | 193 | if( $direction == HistoryPage::DIR_PREV ) |
— | — | @@ -207,7 +212,8 @@ |
208 | 213 | |
209 | 214 | /** |
210 | 215 | * Output a subscription feed listing recent edits to this page. |
211 | | - * @param string $type |
| 216 | + * |
| 217 | + * @param $type String: feed type |
212 | 218 | */ |
213 | 219 | function feed( $type ) { |
214 | 220 | global $wgFeedClasses, $wgRequest, $wgFeedLimit; |
— | — | @@ -258,7 +264,7 @@ |
259 | 265 | * Borrows Recent Changes' feed generation functions for formatting; |
260 | 266 | * includes a diff to the previous revision (if any). |
261 | 267 | * |
262 | | - * @param $row |
| 268 | + * @param $row Object: database row |
263 | 269 | * @return FeedItem |
264 | 270 | */ |
265 | 271 | function feedItem( $row ) { |
— | — | @@ -429,10 +435,11 @@ |
430 | 436 | /** |
431 | 437 | * Creates a submit button |
432 | 438 | * |
433 | | - * @param array $attributes attributes |
434 | | - * @return string HTML output for the submit button |
| 439 | + * @param $message String: text of the submit button, will be escaped |
| 440 | + * @param $attributes Array: attributes |
| 441 | + * @return String: HTML output for the submit button |
435 | 442 | */ |
436 | | - function submitButton($message, $attributes = array() ) { |
| 443 | + function submitButton( $message, $attributes = array() ) { |
437 | 444 | # Disable submit button if history has 1 revision only |
438 | 445 | if( $this->getNumRows() > 1 ) { |
439 | 446 | return Xml::submitButton( $message , $attributes ); |
— | — | @@ -446,13 +453,13 @@ |
447 | 454 | * |
448 | 455 | * @todo document some more, and maybe clean up the code (some params redundant?) |
449 | 456 | * |
450 | | - * @param Row $row The database row corresponding to the previous line. |
451 | | - * @param mixed $next The database row corresponding to the next line. |
452 | | - * @param int $counter Apparently a counter of what row number we're at, counted from the top row = 1. |
| 457 | + * @param $row Object: the database row corresponding to the previous line. |
| 458 | + * @param $next Mixed: the database row corresponding to the next line. |
| 459 | + * @param $counter Integer: apparently a counter of what row number we're at, counted from the top row = 1. |
453 | 460 | * @param $notificationtimestamp |
454 | | - * @param bool $latest Whether this row corresponds to the page's latest revision. |
455 | | - * @param bool $firstInList Whether this row corresponds to the first displayed on this history page. |
456 | | - * @return string HTML output for the row |
| 461 | + * @param $latest Boolean: whether this row corresponds to the page's latest revision. |
| 462 | + * @param $firstInList Boolean: whether this row corresponds to the first displayed on this history page. |
| 463 | + * @return String: HTML output for the row |
457 | 464 | */ |
458 | 465 | function historyLine( $row, $next, $counter = '', $notificationtimestamp = false, |
459 | 466 | $latest = false, $firstInList = false ) |
— | — | @@ -569,8 +576,9 @@ |
570 | 577 | |
571 | 578 | /** |
572 | 579 | * Create a link to view this revision of the page |
573 | | - * @param Revision $rev |
574 | | - * @returns string |
| 580 | + * |
| 581 | + * @param $rev Revision |
| 582 | + * @return String |
575 | 583 | */ |
576 | 584 | function revLink( $rev ) { |
577 | 585 | global $wgLang; |
— | — | @@ -592,9 +600,10 @@ |
593 | 601 | |
594 | 602 | /** |
595 | 603 | * Create a diff-to-current link for this revision for this page |
596 | | - * @param Revision $rev |
597 | | - * @param Bool $latest, this is the latest revision of the page? |
598 | | - * @returns string |
| 604 | + * |
| 605 | + * @param $rev Revision |
| 606 | + * @param $latest Boolean: this is the latest revision of the page? |
| 607 | + * @return String |
599 | 608 | */ |
600 | 609 | function curLink( $rev, $latest ) { |
601 | 610 | $cur = $this->historyPage->message['cur']; |
— | — | @@ -616,10 +625,11 @@ |
617 | 626 | |
618 | 627 | /** |
619 | 628 | * Create a diff-to-previous link for this revision for this page. |
620 | | - * @param Revision $prevRev, the previous revision |
621 | | - * @param mixed $next, the newer revision |
622 | | - * @param int $counter, what row on the history list this is |
623 | | - * @returns string |
| 629 | + * |
| 630 | + * @param $prevRev Revision: the previous revision |
| 631 | + * @param $next Mixed: the newer revision |
| 632 | + * @param $counter Integer: what row on the history list this is |
| 633 | + * @return String |
624 | 634 | */ |
625 | 635 | function lastLink( $prevRev, $next, $counter ) { |
626 | 636 | $last = $this->historyPage->message['last']; |
— | — | @@ -659,10 +669,10 @@ |
660 | 670 | /** |
661 | 671 | * Create radio buttons for page history |
662 | 672 | * |
663 | | - * @param object $rev Revision |
664 | | - * @param bool $firstInList Is this version the first one? |
665 | | - * @param int $counter A counter of what row number we're at, counted from the top row = 1. |
666 | | - * @return string HTML output for the radio buttons |
| 673 | + * @param $rev Revision object |
| 674 | + * @param $firstInList Boolean: is this version the first one? |
| 675 | + * @param $counter Integer: a counter of what row number we're at, counted from the top row = 1. |
| 676 | + * @return String: HTML output for the radio buttons |
667 | 677 | */ |
668 | 678 | function diffButtons( $rev, $firstInList, $counter ) { |
669 | 679 | if( $this->getNumRows() > 1 ) { |