https://www.mediawiki.org/wiki/Special:Code/MediaWiki/113580

Revision: 113580
Author:   reedy
Date:     2012-03-11 18:54:55 +0000 (Sun, 11 Mar 2012)
Log Message:
-----------
Normalise casing of getArticleID used in core

Modified Paths:
--------------
    trunk/phase3/includes/api/ApiQueryInfo.php
    trunk/phase3/includes/filerepo/file/LocalFile.php
    trunk/phase3/includes/logging/LogEntry.php
    trunk/phase3/includes/logging/LogPage.php
    trunk/phase3/includes/revisiondelete/RevisionDelete.php
    trunk/phase3/includes/specials/SpecialImport.php
    trunk/phase3/includes/specials/SpecialMergeHistory.php
    trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
    trunk/phase3/includes/specials/SpecialUndelete.php
    trunk/phase3/maintenance/namespaceDupes.php
    trunk/phase3/skins/Standard.php
    trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php

Modified: trunk/phase3/includes/api/ApiQueryInfo.php
===================================================================
--- trunk/phase3/includes/api/ApiQueryInfo.php  2012-03-11 18:38:27 UTC (rev 
113579)
+++ trunk/phase3/includes/api/ApiQueryInfo.php  2012-03-11 18:54:55 UTC (rev 
113580)
@@ -394,8 +394,8 @@
                }
 
                if ( $this->fld_displaytitle ) {
-                       if ( isset( 
$this->displaytitles[$title->getArticleId()] ) ) {
-                               $pageInfo['displaytitle'] = 
$this->displaytitles[$title->getArticleId()];
+                       if ( isset( 
$this->displaytitles[$title->getArticleID()] ) ) {
+                               $pageInfo['displaytitle'] = 
$this->displaytitles[$title->getArticleID()];
                        } else {
                                $pageInfo['displaytitle'] = 
$title->getPrefixedText();
                        }

Modified: trunk/phase3/includes/filerepo/file/LocalFile.php
===================================================================
--- trunk/phase3/includes/filerepo/file/LocalFile.php   2012-03-11 18:38:27 UTC 
(rev 113579)
+++ trunk/phase3/includes/filerepo/file/LocalFile.php   2012-03-11 18:54:55 UTC 
(rev 113580)
@@ -1094,7 +1094,7 @@
                        $latest = $descTitle->getLatestRevID();
                        $nullRevision = Revision::newNullRevision(
                                $dbw,
-                               $descTitle->getArticleId(),
+                               $descTitle->getArticleID(),
                                $log->getRcComment(),
                                false
                        );

Modified: trunk/phase3/includes/logging/LogEntry.php
===================================================================
--- trunk/phase3/includes/logging/LogEntry.php  2012-03-11 18:38:27 UTC (rev 
113579)
+++ trunk/phase3/includes/logging/LogEntry.php  2012-03-11 18:54:55 UTC (rev 
113580)
@@ -432,7 +432,7 @@
                        'log_user_text' => $this->getPerformer()->getName(),
                        'log_namespace' => $this->getTarget()->getNamespace(),
                        'log_title' => $this->getTarget()->getDBkey(),
-                       'log_page' => $this->getTarget()->getArticleId(),
+                       'log_page' => $this->getTarget()->getArticleID(),
                        'log_comment' => $comment,
                        'log_params' => serialize( (array) 
$this->getParameters() ),
                );
@@ -503,6 +503,9 @@
                return $this->performer;
        }
 
+       /**
+        * @return Title
+        */
        public function getTarget() {
                return $this->target;
        }

Modified: trunk/phase3/includes/logging/LogPage.php
===================================================================
--- trunk/phase3/includes/logging/LogPage.php   2012-03-11 18:38:27 UTC (rev 
113579)
+++ trunk/phase3/includes/logging/LogPage.php   2012-03-11 18:54:55 UTC (rev 
113580)
@@ -86,7 +86,7 @@
                        'log_user_text' => $this->doer->getName(),
                        'log_namespace' => $this->target->getNamespace(),
                        'log_title' => $this->target->getDBkey(),
-                       'log_page' => $this->target->getArticleId(),
+                       'log_page' => $this->target->getArticleID(),
                        'log_comment' => $this->comment,
                        'log_params' => $this->params
                );

Modified: trunk/phase3/includes/revisiondelete/RevisionDelete.php
===================================================================
--- trunk/phase3/includes/revisiondelete/RevisionDelete.php     2012-03-11 
18:38:27 UTC (rev 113579)
+++ trunk/phase3/includes/revisiondelete/RevisionDelete.php     2012-03-11 
18:54:55 UTC (rev 113580)
@@ -300,7 +300,7 @@
        public function __construct( $list, $row ) {
                RevDel_Item::__construct( $list, $row );
                $this->revision = Revision::newFromArchiveRow( $row,
-                       array( 'page' => $this->list->title->getArticleId() ) );
+                       array( 'page' => $this->list->title->getArticleID() ) );
        }
 
        public function getIdField() {
@@ -377,7 +377,7 @@
                RevDel_Item::__construct( $list, $row );
 
                $this->revision = Revision::newFromArchiveRow( $row,
-                       array( 'page' => $this->list->title->getArticleId() ) );
+                       array( 'page' => $this->list->title->getArticleID() ) );
        }
 
        public function getIdField() {

Modified: trunk/phase3/includes/specials/SpecialImport.php
===================================================================
--- trunk/phase3/includes/specials/SpecialImport.php    2012-03-11 18:38:27 UTC 
(rev 113579)
+++ trunk/phase3/includes/specials/SpecialImport.php    2012-03-11 18:54:55 UTC 
(rev 113580)
@@ -390,7 +390,7 @@
                        $comment = $detail; // quick
                        $dbw = wfGetDB( DB_MASTER );
                        $latest = $title->getLatestRevID();
-                       $nullRevision = Revision::newNullRevision( $dbw, 
$title->getArticleId(), $comment, true );
+                       $nullRevision = Revision::newNullRevision( $dbw, 
$title->getArticleID(), $comment, true );
                        if (!is_null($nullRevision)) {
                                $nullRevision->insertOn( $dbw );
                                $page = WikiPage::factory( $title );

Modified: trunk/phase3/includes/specials/SpecialMergeHistory.php
===================================================================
--- trunk/phase3/includes/specials/SpecialMergeHistory.php      2012-03-11 
18:38:27 UTC (rev 113579)
+++ trunk/phase3/includes/specials/SpecialMergeHistory.php      2012-03-11 
18:54:55 UTC (rev 113580)
@@ -296,7 +296,7 @@
                if( is_null( $targetTitle ) || is_null( $destTitle ) ) {
                        return false; // validate these
                }
-               if( $targetTitle->getArticleId() == $destTitle->getArticleId() 
) {
+               if( $targetTitle->getArticleID() == $destTitle->getArticleID() 
) {
                        return false;
                }
                # Verify that this timestamp is valid

Modified: trunk/phase3/includes/specials/SpecialRecentchangeslinked.php
===================================================================
--- trunk/phase3/includes/specials/SpecialRecentchangeslinked.php       
2012-03-11 18:38:27 UTC (rev 113579)
+++ trunk/phase3/includes/specials/SpecialRecentchangeslinked.php       
2012-03-11 18:54:55 UTC (rev 113580)
@@ -88,7 +88,7 @@
                 */
 
                $dbr = wfGetDB( DB_SLAVE, 'recentchangeslinked' );
-               $id = $title->getArticleId();
+               $id = $title->getArticleID();
                $ns = $title->getNamespace();
                $dbkey = $title->getDBkey();
 

Modified: trunk/phase3/includes/specials/SpecialUndelete.php
===================================================================
--- trunk/phase3/includes/specials/SpecialUndelete.php  2012-03-11 18:38:27 UTC 
(rev 113579)
+++ trunk/phase3/includes/specials/SpecialUndelete.php  2012-03-11 18:54:55 UTC 
(rev 113580)
@@ -195,7 +195,7 @@
                                        'ar_timestamp' => $dbr->timestamp( 
$timestamp ) ),
                        __METHOD__ );
                if( $row ) {
-                       return Revision::newFromArchiveRow( $row, array( 'page' 
=> $this->title->getArticleId() ) );
+                       return Revision::newFromArchiveRow( $row, array( 'page' 
=> $this->title->getArticleID() ) );
                } else {
                        return null;
                }
@@ -1160,7 +1160,7 @@
 
        private function formatRevisionRow( $row, $earliestLiveTime, $remaining 
) {
                $rev = Revision::newFromArchiveRow( $row,
-                       array( 'page' => $this->mTargetObj->getArticleId() ) );
+                       array( 'page' => $this->mTargetObj->getArticleID() ) );
                $stxt = '';
                $ts = wfTimestamp( TS_MW, $row->ar_timestamp );
                // Build checkboxen...

Modified: trunk/phase3/maintenance/namespaceDupes.php
===================================================================
--- trunk/phase3/maintenance/namespaceDupes.php 2012-03-11 18:38:27 UTC (rev 
113579)
+++ trunk/phase3/maintenance/namespaceDupes.php 2012-03-11 18:54:55 UTC (rev 
113580)
@@ -257,7 +257,7 @@
                        $newTitle->getDBkey(),
                        $newTitle->getPrefixedText() ) );
 
-               $id = $newTitle->getArticleId();
+               $id = $newTitle->getArticleID();
                if ( $id ) {
                        $this->output( "...  *** cannot resolve automatically; 
page exists with ID $id ***\n" );
                        return false;
@@ -285,7 +285,7 @@
                                        $this->output( "... !!! invalid 
title\n" );
                                        return false;
                                }
-                               $id = $title->getArticleId();
+                               $id = $title->getArticleID();
                                if ( $id ) {
                                        $this->output( "...  *** page exists 
with ID $id ***\n" );
                                } else {

Modified: trunk/phase3/skins/Standard.php
===================================================================
--- trunk/phase3/skins/Standard.php     2012-03-11 18:38:27 UTC (rev 113579)
+++ trunk/phase3/skins/Standard.php     2012-03-11 18:54:55 UTC (rev 113580)
@@ -143,7 +143,7 @@
                }
 
                $s .= "\n<hr class='sep' />";
-               $articleExists = $title->getArticleId();
+               $articleExists = $title->getArticleID();
                if ( $this->data['isarticle'] || $action == 'edit' || $action 
== 'history' || $wpPreview ) {
                        if( $this->data['isarticle'] ) {
                                $s .= '<strong>' . $this->editThisPage() . 
'</strong>';

Modified: trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php    
2012-03-11 18:38:27 UTC (rev 113579)
+++ trunk/phase3/tests/phpunit/includes/upload/UploadFromUrlTest.php    
2012-03-11 18:54:55 UTC (rev 113580)
@@ -232,7 +232,7 @@
                        $page->doDeleteArticle( '' );
                }
 
-               $this->assertFalse( (bool)$talk->getArticleId( 
Title::GAID_FOR_UPDATE ), 'User talk does not exist' );
+               $this->assertFalse( (bool)$talk->getArticleID( 
Title::GAID_FOR_UPDATE ), 'User talk does not exist' );
 
                $data = $this->doApiRequest( array(
                        'action' => 'upload',
@@ -249,7 +249,7 @@
                $job->run();
 
                $this->assertTrue( wfLocalFile( 'UploadFromUrlTest.png' 
)->exists() );
-               $this->assertTrue( (bool)$talk->getArticleId( 
Title::GAID_FOR_UPDATE ), 'User talk exists' );
+               $this->assertTrue( (bool)$talk->getArticleID( 
Title::GAID_FOR_UPDATE ), 'User talk exists' );
 
                $this->deleteFile( 'UploadFromUrlTest.png' );
 


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to