Index: trunk/phase3/includes/Article.php |
— | — | @@ -70,7 +70,7 @@ |
71 | 71 | * from another page on the wiki. |
72 | 72 | * @param $from Title object. |
73 | 73 | */ |
74 | | - public function setRedirectedFrom( $from ) { |
| 74 | + public function setRedirectedFrom( Title $from ) { |
75 | 75 | $this->mRedirectedFrom = $from; |
76 | 76 | } |
77 | 77 | |
— | — | @@ -136,6 +136,7 @@ |
137 | 137 | /** |
138 | 138 | * Get the Title object this text redirects to |
139 | 139 | * |
| 140 | + * @param $text string article content containing redirect info |
140 | 141 | * @return mixed false, Title of in-wiki target, or string with URL |
141 | 142 | */ |
142 | 143 | public function followRedirectText( $text ) { |
— | — | @@ -173,6 +174,7 @@ |
174 | 175 | |
175 | 176 | /** |
176 | 177 | * get the title object of the article |
| 178 | + * @return Title object of current title |
177 | 179 | */ |
178 | 180 | public function getTitle() { |
179 | 181 | return $this->mTitle; |
— | — | @@ -349,6 +351,7 @@ |
350 | 352 | * Fetch a page record with the given conditions |
351 | 353 | * @param $dbr Database object |
352 | 354 | * @param $conditions Array |
| 355 | + * @return mixed Database result resource, or false on failure |
353 | 356 | */ |
354 | 357 | protected function pageData( $dbr, $conditions ) { |
355 | 358 | $fields = array( |
— | — | @@ -376,8 +379,12 @@ |
377 | 380 | } |
378 | 381 | |
379 | 382 | /** |
| 383 | + * Fetch a page record matching the Title object's namespace and title |
| 384 | + * using a sanitized title string |
| 385 | + * |
380 | 386 | * @param $dbr Database object |
381 | 387 | * @param $title Title object |
| 388 | + * @return mixed Database result resource, or false on failure |
382 | 389 | */ |
383 | 390 | public function pageDataFromTitle( $dbr, $title ) { |
384 | 391 | return $this->pageData( $dbr, array( |
— | — | @@ -386,6 +393,8 @@ |
387 | 394 | } |
388 | 395 | |
389 | 396 | /** |
| 397 | + * Fetch a page record matching the requested ID |
| 398 | + * |
390 | 399 | * @param $dbr Database |
391 | 400 | * @param $id Integer |
392 | 401 | */ |
— | — | @@ -431,8 +440,9 @@ |
432 | 441 | /** |
433 | 442 | * Get text of an article from database |
434 | 443 | * Does *NOT* follow redirects. |
| 444 | + * |
435 | 445 | * @param $oldid Int: 0 for whatever the latest revision is |
436 | | - * @return string |
| 446 | + * @return mixed string containing article contents, or false if null |
437 | 447 | */ |
438 | 448 | function fetchContent( $oldid = 0 ) { |
439 | 449 | if ( $this->mContentLoaded ) { |
— | — | @@ -498,6 +508,7 @@ |
499 | 509 | * Read/write accessor to select FOR UPDATE |
500 | 510 | * |
501 | 511 | * @param $x Mixed: FIXME |
| 512 | + * @return |
502 | 513 | */ |
503 | 514 | public function forUpdate( $x = null ) { |
504 | 515 | return wfSetVar( $this->mForUpdate, $x ); |