Fix case of various newFromID/newFromId functions
authorumherirrender <umherirrender_de.wp@web.de>
Tue, 2 Dec 2014 18:13:06 +0000 (19:13 +0100)
committerIAlex <codereview@emsenhuber.ch>
Wed, 10 Dec 2014 19:40:27 +0000 (19:40 +0000)
User::newFromID -> User::newFromId
Revision::newFromID -> Revision::newFromId
RecentChange::newFromID -> RecentChange::newFromId

WikiPage::newFromId -> WikiPage::newFromID
Title::newFromId -> Title::newFromID

Change-Id: I310f26653613951e9b21ce915a92d205a87937f1

includes/Block.php
includes/api/ApiEditPage.php
includes/api/ApiParse.php
includes/api/ApiPatrol.php
includes/api/ApiQueryRevisionsBase.php
includes/changes/RecentChange.php
includes/deferred/SearchUpdate.php
maintenance/storage/recompressTracked.php

index 3c80035..f2ab6d5 100644 (file)
@@ -113,7 +113,7 @@ class Block {
                        $this->forcedTargetID = $user; // needed for foreign users
                }
                if ( $by ) { // local user
-                       $this->setBlocker( User::newFromID( $by ) );
+                       $this->setBlocker( User::newFromId( $by ) );
                } else { // foreign user
                        $this->setBlocker( $byText );
                }
@@ -366,7 +366,7 @@ class Block {
        protected function initFromRow( $row ) {
                $this->setTarget( $row->ipb_address );
                if ( $row->ipb_by ) { // local user
-                       $this->setBlocker( User::newFromID( $row->ipb_by ) );
+                       $this->setBlocker( User::newFromId( $row->ipb_by ) );
                } else { // foreign user
                        $this->setBlocker( $row->ipb_by_text );
                }
index 80589c3..a396ffe 100644 (file)
@@ -195,9 +195,9 @@ class ApiEditPage extends ApiBase {
                                        list( $params['undo'], $params['undoafter'] ) =
                                                array( $params['undoafter'], $params['undo'] );
                                }
-                               $undoafterRev = Revision::newFromID( $params['undoafter'] );
+                               $undoafterRev = Revision::newFromId( $params['undoafter'] );
                        }
-                       $undoRev = Revision::newFromID( $params['undo'] );
+                       $undoRev = Revision::newFromId( $params['undo'] );
                        if ( is_null( $undoRev ) || $undoRev->isDeleted( Revision::DELETED_TEXT ) ) {
                                $this->dieUsageMsg( array( 'nosuchrevid', $params['undo'] ) );
                        }
index 2bf1677..f260385 100644 (file)
@@ -87,7 +87,7 @@ class ApiParse extends ApiBase {
                if ( !is_null( $oldid ) || !is_null( $pageid ) || !is_null( $page ) ) {
                        if ( !is_null( $oldid ) ) {
                                // Don't use the parser cache
-                               $rev = Revision::newFromID( $oldid );
+                               $rev = Revision::newFromId( $oldid );
                                if ( !$rev ) {
                                        $this->dieUsage( "There is no revision ID $oldid", 'missingrev' );
                                }
index 3684461..779c418 100644 (file)
@@ -38,7 +38,7 @@ class ApiPatrol extends ApiBase {
                $this->requireOnlyOneParameter( $params, 'rcid', 'revid' );
 
                if ( isset( $params['rcid'] ) ) {
-                       $rc = RecentChange::newFromID( $params['rcid'] );
+                       $rc = RecentChange::newFromId( $params['rcid'] );
                        if ( !$rc ) {
                                $this->dieUsageMsg( array( 'nosuchrcid', $params['rcid'] ) );
                        }
index 4d75a20..a658309 100644 (file)
@@ -78,7 +78,7 @@ abstract class ApiQueryRevisionsBase extends ApiQueryGeneratorBase {
                        // DifferenceEngine returns a rather ambiguous empty
                        // string if that's not the case
                        if ( $params['diffto'] != 0 ) {
-                               $difftoRev = Revision::newFromID( $params['diffto'] );
+                               $difftoRev = Revision::newFromId( $params['diffto'] );
                                if ( !$difftoRev ) {
                                        $this->dieUsageMsg( array( 'nosuchrevid', $params['diffto'] ) );
                                }
index d187c54..bf0c644 100644 (file)
@@ -257,7 +257,7 @@ class RecentChange {
        public function getPerformer() {
                if ( $this->mPerformer === false ) {
                        if ( $this->mAttribs['rc_user'] ) {
-                               $this->mPerformer = User::newFromID( $this->mAttribs['rc_user'] );
+                               $this->mPerformer = User::newFromId( $this->mAttribs['rc_user'] );
                        } else {
                                $this->mPerformer = User::newFromName( $this->mAttribs['rc_user_text'], false );
                        }
index 5d084af..8808c20 100644 (file)
@@ -80,7 +80,7 @@ class SearchUpdate implements DeferrableUpdate {
 
                wfProfileIn( __METHOD__ );
 
-               $page = WikiPage::newFromId( $this->id, WikiPage::READ_LATEST );
+               $page = WikiPage::newFromID( $this->id, WikiPage::READ_LATEST );
 
                foreach ( SearchEngine::getSearchTypes() as $type ) {
                        $search = SearchEngine::create( $type );
index 910f56b..45cc339 100644 (file)
@@ -471,7 +471,7 @@ class RecompressTracked {
         * @param int $pageId
         */
        function doPage( $pageId ) {
-               $title = Title::newFromId( $pageId );
+               $title = Title::newFromID( $pageId );
                if ( $title ) {
                        $titleText = $title->getPrefixedText();
                } else {