r88918 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r88917‎ | r88918 | r88919 >
Date:19:21, 26 May 2011
Author:reedy
Status:ok
Tags:
Comment:
Param documentation updates/added
Modified paths:
  • /trunk/phase3/includes/ImageQueryPage.php (modified) (history)
  • /trunk/phase3/includes/LogPage.php (modified) (history)
  • /trunk/phase3/includes/cache/LinkCache.php (modified) (history)
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)
  • /trunk/phase3/includes/media/GIF.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialListredirects.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMergeHistory.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostcategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialMostlinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialPopularpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialRecentchangeslinked.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialShortpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnusedtemplates.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialUnwatchedpages.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWantedcategories.php (modified) (history)
  • /trunk/phase3/includes/specials/SpecialWhatlinkshere.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ImageQueryPage.php
@@ -15,7 +15,7 @@
1616 *
1717 * @param $out OutputPage to print to
1818 * @param $skin Skin: user skin to use [unused]
19 - * @param $dbr Database (read) connection to use
 19+ * @param $dbr DatabaseBase (read) connection to use
2020 * @param $res Integer: result pointer
2121 * @param $num Integer: number of available result rows
2222 * @param $offset Integer: paging offset
Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -34,6 +34,11 @@
3535 return $array_out;
3636 }
3737
 38+ /**
 39+ * @param $db DatabaseBase
 40+ * @param $stmt
 41+ * @param bool $unique
 42+ */
3843 function __construct( &$db, $stmt, $unique = false ) {
3944 $this->db =& $db;
4045
Index: trunk/phase3/includes/db/Database.php
@@ -217,7 +217,12 @@
218218 protected $mDoneWrites = false;
219219 protected $mPHPError = false;
220220
221 - protected $mServer, $mUser, $mPassword, $mConn = null, $mDBname;
 221+ protected $mServer, $mUser, $mPassword, $mDBname;
 222+
 223+ /**
 224+ * @var DatabaseBase
 225+ */
 226+ protected $mConn = null;
222227 protected $mOpened = false;
223228
224229 protected $mTablePrefix;
Index: trunk/phase3/includes/media/GIF.php
@@ -27,6 +27,10 @@
2828 return serialize($parsedGIFMetadata);
2929 }
3030
 31+ /**
 32+ * @param $image File
 33+ * @return array|bool
 34+ */
3135 function formatMetadata( $image ) {
3236 $meta = $image->getMetadata();
3337
Index: trunk/phase3/includes/cache/LinkCache.php
@@ -85,6 +85,9 @@
8686 'revision' => intval( $revision ) );
8787 }
8888
 89+ /**
 90+ * @param $title Title
 91+ */
8992 public function addBadLinkObj( $title ) {
9093 $dbkey = $title->getPrefixedDbKey();
9194 if ( !$this->isBadLink( $dbkey ) ) {
@@ -96,6 +99,9 @@
97100 unset( $this->mBadLinks[$title] );
98101 }
99102
 103+ /**
 104+ * @param $title Title
 105+ */
100106 public function clearLink( $title ) {
101107 $dbkey = $title->getPrefixedDbKey();
102108 if( isset($this->mBadLinks[$dbkey]) ) {
Index: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
@@ -220,6 +220,9 @@
221221 return $extraOpts;
222222 }
223223
 224+ /**
 225+ * @return Title
 226+ */
224227 function getTargetTitle() {
225228 if ( $this->rclTargetTitle === null ) {
226229 $opts = $this->getOptions();
Index: trunk/phase3/includes/specials/SpecialMostcategories.php
@@ -52,6 +52,11 @@
5353 );
5454 }
5555
 56+ /**
 57+ * @param $skin Skin
 58+ * @param $result
 59+ * @return string
 60+ */
5661 function formatResult( $skin, $result ) {
5762 global $wgLang;
5863 $title = Title::makeTitleSafe( $result->namespace, $result->title );
Index: trunk/phase3/includes/specials/SpecialPopularpages.php
@@ -48,6 +48,11 @@
4949 'page_namespace' => MWNamespace::getContentNamespaces() ) );
5050 }
5151
 52+ /**
 53+ * @param $skin Skin
 54+ * @param $result
 55+ * @return string
 56+ */
5257 function formatResult( $skin, $result ) {
5358 global $wgLang, $wgContLang;
5459 $title = Title::makeTitle( $result->namespace, $result->title );
Index: trunk/phase3/includes/specials/SpecialUnwatchedpages.php
@@ -60,6 +60,11 @@
6161 return array( 'page_namespace', 'page_title' );
6262 }
6363
 64+ /**
 65+ * @param $skin Skin
 66+ * @param $result
 67+ * @return string
 68+ */
6469 function formatResult( $skin, $result ) {
6570 global $wgContLang;
6671
Index: trunk/phase3/includes/specials/SpecialWhatlinkshere.php
@@ -28,9 +28,18 @@
2929 */
3030 class SpecialWhatLinksHere extends SpecialPage {
3131
32 - // Stored objects
33 - protected $opts, $target, $selfTitle;
 32+ /**
 33+ * @var FormOptions
 34+ */
 35+ protected $opts;
3436
 37+ protected $selfTitle;
 38+
 39+ /**
 40+ * @var Title
 41+ */
 42+ protected $target;
 43+
3544 protected $limits = array( 20, 50, 100, 250, 500 );
3645
3746 public function __construct() {
Index: trunk/phase3/includes/specials/SpecialShortpages.php
@@ -61,6 +61,11 @@
6262 return array( 'page_len' );
6363 }
6464
 65+ /**
 66+ * @param $db DatabaseBase
 67+ * @param $res
 68+ * @return void
 69+ */
6570 function preprocessResults( $db, $res ) {
6671 # There's no point doing a batch check if we aren't caching results;
6772 # the page must exist for it to have been pulled out of the table
Index: trunk/phase3/includes/specials/SpecialUnusedtemplates.php
@@ -54,6 +54,11 @@
5555 );
5656 }
5757
 58+ /**
 59+ * @param $skin Skin
 60+ * @param $result
 61+ * @return string
 62+ */
5863 function formatResult( $skin, $result ) {
5964 $title = Title::makeTitle( NS_TEMPLATE, $result->title );
6065 $pageLink = $skin->linkKnown(
Index: trunk/phase3/includes/specials/SpecialWantedcategories.php
@@ -48,6 +48,11 @@
4949 );
5050 }
5151
 52+ /**
 53+ * @param $skin Skin
 54+ * @param $result
 55+ * @return string
 56+ */
5257 function formatResult( $skin, $result ) {
5358 global $wgLang, $wgContLang;
5459
Index: trunk/phase3/includes/specials/SpecialMostlinked.php
@@ -57,6 +57,9 @@
5858
5959 /**
6060 * Pre-fill the link cache
 61+ *
 62+ * @param $db DatabaseBase
 63+ * @param $res
6164 */
6265 function preprocessResults( $db, $res ) {
6366 if( $db->numRows( $res ) > 0 ) {
Index: trunk/phase3/includes/specials/SpecialListredirects.php
@@ -63,6 +63,8 @@
6464
6565 /**
6666 * Cache page existence for performance
 67+ *
 68+ * @param $db DatabaseBase
6769 */
6870 function preprocessResults( $db, $res ) {
6971 $batch = new LinkBatch;
Index: trunk/phase3/includes/specials/SpecialMergeHistory.php
@@ -35,6 +35,10 @@
3636 parent::__construct( 'MergeHistory', 'mergehistory' );
3737 }
3838
 39+ /**
 40+ * @param $request WebRequest
 41+ * @return void
 42+ */
3943 private function loadRequestParams( $request ) {
4044 global $wgUser;
4145
Index: trunk/phase3/includes/LogPage.php
@@ -38,7 +38,18 @@
3939 const SUPPRESSED_USER = 12;
4040 const SUPPRESSED_ACTION = 9;
4141 /* @access private */
42 - var $type, $action, $comment, $params, $target, $doer;
 42+ var $type, $action, $comment, $params;
 43+
 44+ /**
 45+ * @var User
 46+ */
 47+ var $doer;
 48+
 49+ /**
 50+ * @var Title
 51+ */
 52+ var $target;
 53+
4354 /* @acess public */
4455 var $updateRecentChanges, $sendToUDP;
4556

Status & tagging log