r63760 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r63759‎ | r63760 | r63761 >
Date:23:20, 14 March 2010
Author:lhridley
Status:ok
Tags:
Comment:
Expanding documentation for first ~500 lines or so
Modified paths:
  • /trunk/phase3/includes/Article.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Article.php
@@ -70,7 +70,7 @@
7171 * from another page on the wiki.
7272 * @param $from Title object.
7373 */
74 - public function setRedirectedFrom( $from ) {
 74+ public function setRedirectedFrom( Title $from ) {
7575 $this->mRedirectedFrom = $from;
7676 }
7777
@@ -136,6 +136,7 @@
137137 /**
138138 * Get the Title object this text redirects to
139139 *
 140+ * @param $text string article content containing redirect info
140141 * @return mixed false, Title of in-wiki target, or string with URL
141142 */
142143 public function followRedirectText( $text ) {
@@ -173,6 +174,7 @@
174175
175176 /**
176177 * get the title object of the article
 178+ * @return Title object of current title
177179 */
178180 public function getTitle() {
179181 return $this->mTitle;
@@ -349,6 +351,7 @@
350352 * Fetch a page record with the given conditions
351353 * @param $dbr Database object
352354 * @param $conditions Array
 355+ * @return mixed Database result resource, or false on failure
353356 */
354357 protected function pageData( $dbr, $conditions ) {
355358 $fields = array(
@@ -376,8 +379,12 @@
377380 }
378381
379382 /**
 383+ * Fetch a page record matching the Title object's namespace and title
 384+ * using a sanitized title string
 385+ *
380386 * @param $dbr Database object
381387 * @param $title Title object
 388+ * @return mixed Database result resource, or false on failure
382389 */
383390 public function pageDataFromTitle( $dbr, $title ) {
384391 return $this->pageData( $dbr, array(
@@ -386,6 +393,8 @@
387394 }
388395
389396 /**
 397+ * Fetch a page record matching the requested ID
 398+ *
390399 * @param $dbr Database
391400 * @param $id Integer
392401 */
@@ -431,8 +440,9 @@
432441 /**
433442 * Get text of an article from database
434443 * Does *NOT* follow redirects.
 444+ *
435445 * @param $oldid Int: 0 for whatever the latest revision is
436 - * @return string
 446+ * @return mixed string containing article contents, or false if null
437447 */
438448 function fetchContent( $oldid = 0 ) {
439449 if ( $this->mContentLoaded ) {
@@ -498,6 +508,7 @@
499509 * Read/write accessor to select FOR UPDATE
500510 *
501511 * @param $x Mixed: FIXME
 512+ * @return
502513 */
503514 public function forUpdate( $x = null ) {
504515 return wfSetVar( $this->mForUpdate, $x );

Status & tagging log