Add comment
authorSam Reed <reedy@users.mediawiki.org>
Mon, 18 Jul 2011 22:23:42 +0000 (22:23 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Mon, 18 Jul 2011 22:23:42 +0000 (22:23 +0000)
Remove unused wfGetDb()

includes/Block.php
includes/WikiPage.php

index a59d935..e5a17d9 100644 (file)
@@ -346,13 +346,13 @@ class Block {
        protected function initFromRow( $row ) {
                $this->setTarget( $row->ipb_address );
                $this->setBlocker( User::newFromId( $row->ipb_by ) );
-               
+
                $this->mReason = $row->ipb_reason;
                $this->mTimestamp = wfTimestamp( TS_MW, $row->ipb_timestamp );
                $this->mAuto = $row->ipb_auto;
                $this->mHideName = $row->ipb_deleted;
                $this->mId = $row->ipb_id;
-               
+
                // I wish I didn't have to do this
                $db = wfGetDB( DB_SLAVE );
                if ( $row->ipb_expiry == $db->getInfinity() ) {
@@ -643,7 +643,6 @@ class Block {
                $autoblock->mHideName = $this->mHideName;
                $autoblock->prevents( 'editownusertalk', $this->prevents( 'editownusertalk' ) );
 
-                $dbr = wfGetDB( DB_SLAVE );
                if ( $this->mExpiry == 'infinity' ) {
                        # Original block was indefinite, start an autoblock now
                        $autoblock->mExpiry = Block::getAutoblockExpiry( $timestamp );
index 8804f83..5899fc0 100644 (file)
@@ -82,6 +82,8 @@ class WikiPage extends Page {
         * Always override this for all subclasses (until we use PHP with LSB)
         *
         * @param $id Int article ID to load
+        *
+        * @return WikiPage
         */
        public static function newFromID( $id ) {
                $t = Title::newFromID( $id );
@@ -278,6 +280,8 @@ class WikiPage extends Page {
        /**
         * Return the list of revision fields that should be selected to create
         * a new page.
+        *
+        * @return array
         */
        public static function selectFields() {
                return array(
@@ -535,7 +539,7 @@ class WikiPage extends Page {
         *      Revision::FOR_THIS_USER    to be displayed to $wgUser
         *      Revision::RAW              get the text regardless of permissions
         * @return String|false The text of the current revision
-        */     
+        */
        public function getText( $audience = Revision::FOR_PUBLIC ) {
                $this->loadLastEdit();
                if ( $this->mLastRevision ) {