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

Revision: 113593
Author:   reedy
Date:     2012-03-11 22:05:54 +0000 (Sun, 11 Mar 2012)
Log Message:
-----------
More of r113580

Modified Paths:
--------------
    trunk/phase3/includes/EditPage.php
    trunk/phase3/includes/Revision.php
    trunk/phase3/includes/Skin.php
    trunk/phase3/includes/SkinLegacy.php
    trunk/phase3/includes/SkinTemplate.php
    trunk/phase3/includes/Title.php
    trunk/phase3/includes/WikiPage.php
    trunk/phase3/includes/actions/InfoAction.php
    trunk/phase3/includes/cache/LinkBatch.php

Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php  2012-03-11 21:45:54 UTC (rev 113592)
+++ trunk/phase3/includes/EditPage.php  2012-03-11 22:05:54 UTC (rev 113593)
@@ -376,7 +376,7 @@
                                wfProfileOut( __METHOD__ );
                                return;
                        }
-                       if ( !$this->mTitle->getArticleId() )
+                       if ( !$this->mTitle->getArticleID() )
                                wfRunHooks( 'EditFormPreloadText', array( 
&$this->textbox1, &$this->mTitle ) );
                        else
                                wfRunHooks( 'EditFormInitialText', array( $this 
) );
@@ -805,7 +805,7 @@
                                        # Otherwise, $text will be left as-is.
                                        if ( !is_null( $undorev ) && !is_null( 
$oldrev ) &&
                                                $undorev->getPage() == 
$oldrev->getPage() &&
-                                               $undorev->getPage() == 
$this->mTitle->getArticleId() &&
+                                               $undorev->getPage() == 
$this->mTitle->getArticleID() &&
                                                !$undorev->isDeleted( 
Revision::DELETED_TEXT ) &&
                                                !$oldrev->isDeleted( 
Revision::DELETED_TEXT ) ) {
 
@@ -1478,7 +1478,7 @@
                $res = $dbw->select( 'revision',
                        'rev_user',
                        array(
-                               'rev_page' => $this->mTitle->getArticleId(),
+                               'rev_page' => $this->mTitle->getArticleID(),
                                'rev_timestamp > ' . $dbw->addQuotes( 
$dbw->timestamp( $edittime ) )
                        ),
                        __METHOD__,

Modified: trunk/phase3/includes/Revision.php
===================================================================
--- trunk/phase3/includes/Revision.php  2012-03-11 21:45:54 UTC (rev 113592)
+++ trunk/phase3/includes/Revision.php  2012-03-11 22:05:54 UTC (rev 113593)
@@ -1185,7 +1185,7 @@
                        $id = 0;
                }
                $conds = array( 'rev_id' => $id );
-               $conds['rev_page'] = $title->getArticleId();
+               $conds['rev_page'] = $title->getArticleID();
                $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', 
$conds, __METHOD__ );
                if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) {
                        # Not in slave, try master
@@ -1219,7 +1219,7 @@
         * @return Integer
         */
        static function countByTitle( $db, $title ) {
-               $id = $title->getArticleId();
+               $id = $title->getArticleID();
                if( $id ) {
                        return Revision::countByPageId( $db, $id );
                }

Modified: trunk/phase3/includes/Skin.php
===================================================================
--- trunk/phase3/includes/Skin.php      2012-03-11 21:45:54 UTC (rev 113592)
+++ trunk/phase3/includes/Skin.php      2012-03-11 22:05:54 UTC (rev 113593)
@@ -662,7 +662,7 @@
                $action = $this->getRequest()->getVal( 'action', 'view' );
 
                if ( $this->getUser()->isAllowed( 'deletedhistory' ) &&
-                       ( $this->getTitle()->getArticleId() == 0 || $action == 
'history' ) ) {
+                       ( $this->getTitle()->getArticleID() == 0 || $action == 
'history' ) ) {
                        $n = $this->getTitle()->isDeleted();
 
 

Modified: trunk/phase3/includes/SkinLegacy.php
===================================================================
--- trunk/phase3/includes/SkinLegacy.php        2012-03-11 21:45:54 UTC (rev 
113592)
+++ trunk/phase3/includes/SkinLegacy.php        2012-03-11 22:05:54 UTC (rev 
113593)
@@ -324,7 +324,7 @@
 
                        $s = implode( $element, $sep );
 
-                       if ( $title->getArticleId() ) {
+                       if ( $title->getArticleID() ) {
                                $s .= "\n<br />";
 
                                // Delete/protect/move links for privileged 
users
@@ -573,7 +573,7 @@
                $diff = $wgRequest->getVal( 'diff' );
                $title = $this->getSkin()->getTitle();
 
-               if ( $title->getArticleId() && ( !$diff ) && 
$wgUser->isAllowed( 'delete' ) ) {
+               if ( $title->getArticleID() && ( !$diff ) && 
$wgUser->isAllowed( 'delete' ) ) {
                        $t = wfMsg( 'deletethispage' );
 
                        $s = Linker::linkKnown(
@@ -595,7 +595,7 @@
                $diff = $wgRequest->getVal( 'diff' );
                $title = $this->getSkin()->getTitle();
 
-               if ( $title->getArticleId() && ( ! $diff ) && 
$wgUser->isAllowed( 'protect' ) ) {
+               if ( $title->getArticleID() && ( ! $diff ) && 
$wgUser->isAllowed( 'protect' ) ) {
                        if ( $title->isProtected() ) {
                                $text = wfMsg( 'unprotectthispage' );
                                $query = array( 'action' => 'unprotect' );

Modified: trunk/phase3/includes/SkinTemplate.php
===================================================================
--- trunk/phase3/includes/SkinTemplate.php      2012-03-11 21:45:54 UTC (rev 
113592)
+++ trunk/phase3/includes/SkinTemplate.php      2012-03-11 22:05:54 UTC (rev 
113593)
@@ -216,7 +216,7 @@
                $tpl->setRef( 'thispage', $this->thispage );
                $tpl->setRef( 'titleprefixeddbkey', $this->thispage );
                $tpl->set( 'titletext', $title->getText() );
-               $tpl->set( 'articleid', $title->getArticleId() );
+               $tpl->set( 'articleid', $title->getArticleID() );
 
                $tpl->set( 'isarticle', $out->isArticle() );
 
@@ -1173,7 +1173,7 @@
                        $nav_urls['whatlinkshere'] = array(
                                'href' => SpecialPage::getTitleFor( 
'Whatlinkshere', $this->thispage )->getLocalUrl()
                        );
-                       if ( $this->getTitle()->getArticleId() ) {
+                       if ( $this->getTitle()->getArticleID() ) {
                                $nav_urls['recentchangeslinked'] = array(
                                        'href' => SpecialPage::getTitleFor( 
'Recentchangeslinked', $this->thispage )->getLocalUrl()
                                );

Modified: trunk/phase3/includes/Title.php
===================================================================
--- trunk/phase3/includes/Title.php     2012-03-11 21:45:54 UTC (rev 113592)
+++ trunk/phase3/includes/Title.php     2012-03-11 22:05:54 UTC (rev 113593)
@@ -2538,7 +2538,7 @@
 
                if ( $oldFashionedRestrictions === null ) {
                        $oldFashionedRestrictions = $dbr->selectField( 'page', 
'page_restrictions',
-                               array( 'page_id' => $this->getArticleId() ), 
__METHOD__ );
+                               array( 'page_id' => $this->getArticleID() ), 
__METHOD__ );
                }
 
                if ( $oldFashionedRestrictions != '' ) {
@@ -2609,7 +2609,7 @@
                                $res = $dbr->select(
                                        'page_restrictions',
                                        '*',
-                                       array( 'pr_page' => 
$this->getArticleId() ),
+                                       array( 'pr_page' => 
$this->getArticleID() ),
                                        __METHOD__
                                );
 
@@ -3167,7 +3167,7 @@
         * @return Array of Title objects linking here
         */
        public function getLinksFrom( $options = array(), $table = 'pagelinks', 
$prefix = 'pl' ) {
-               $id = $this->getArticleId();
+               $id = $this->getArticleID();
 
                # If the page doesn't exist; there can't be any link from this 
page
                if ( !$id ) {
@@ -3231,7 +3231,7 @@
         * @return Array of Title the Title objects
         */
        public function getBrokenLinksFrom() {
-               if ( $this->getArticleId() == 0 ) {
+               if ( $this->getArticleID() == 0 ) {
                        # All links from article ID 0 are false positives
                        return array();
                }
@@ -3241,7 +3241,7 @@
                        array( 'page', 'pagelinks' ),
                        array( 'pl_namespace', 'pl_title' ),
                        array(
-                               'pl_from' => $this->getArticleId(),
+                               'pl_from' => $this->getArticleID(),
                                'page_namespace IS NULL'
                        ),
                        __METHOD__, array(),
@@ -3714,8 +3714,8 @@
                        // We don't know whether this function was called before
                        // or after moving the root page, so check both
                        // $this and $nt
-                       if ( $oldSubpage->getArticleId() == 
$this->getArticleId() ||
-                                       $oldSubpage->getArticleID() == 
$nt->getArticleId() )
+                       if ( $oldSubpage->getArticleID() == 
$this->getArticleID() ||
+                                       $oldSubpage->getArticleID() == 
$nt->getArticleID() )
                        {
                                // When moving a page to a subpage of itself,
                                // don't move it twice
@@ -3839,7 +3839,7 @@
 
                $data = array();
 
-               $titleKey = $this->getArticleId();
+               $titleKey = $this->getArticleID();
 
                if ( $titleKey === 0 ) {
                        return $data;
@@ -3917,7 +3917,7 @@
                $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) 
: wfGetDB( DB_SLAVE );
                return $db->selectField( 'revision', 'rev_id',
                        array(
-                               'rev_page' => $this->getArticleId( $flags ),
+                               'rev_page' => $this->getArticleID( $flags ),
                                'rev_id < ' . intval( $revId )
                        ),
                        __METHOD__,
@@ -3936,7 +3936,7 @@
                $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) 
: wfGetDB( DB_SLAVE );
                return $db->selectField( 'revision', 'rev_id',
                        array(
-                               'rev_page' => $this->getArticleId( $flags ),
+                               'rev_page' => $this->getArticleID( $flags ),
                                'rev_id > ' . intval( $revId )
                        ),
                        __METHOD__,
@@ -3951,7 +3951,7 @@
         * @return Revision|Null if page doesn't exist
         */
        public function getFirstRevision( $flags = 0 ) {
-               $pageId = $this->getArticleId( $flags );
+               $pageId = $this->getArticleID( $flags );
                if ( $pageId ) {
                        $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( 
DB_MASTER ) : wfGetDB( DB_SLAVE );
                        $row = $db->selectRow( 'revision', '*',
@@ -4016,7 +4016,7 @@
                if ( $this->mEstimateRevisions === null ) {
                        $dbr = wfGetDB( DB_SLAVE );
                        $this->mEstimateRevisions = $dbr->estimateRowCount( 
'revision', '*',
-                               array( 'rev_page' => $this->getArticleId() ), 
__METHOD__ );
+                               array( 'rev_page' => $this->getArticleID() ), 
__METHOD__ );
                }
 
                return $this->mEstimateRevisions;
@@ -4043,7 +4043,7 @@
                $dbr = wfGetDB( DB_SLAVE );
                return (int)$dbr->selectField( 'revision', 'count(*)',
                        array(
-                               'rev_page' => $this->getArticleId(),
+                               'rev_page' => $this->getArticleID(),
                                'rev_timestamp > ' . $dbr->addQuotes( 
$dbr->timestamp( $old->getTimestamp() ) ),
                                'rev_timestamp < ' . $dbr->addQuotes( 
$dbr->timestamp( $new->getTimestamp() ) )
                        ),
@@ -4117,7 +4117,7 @@
         * @return Bool
         */
        public function exists() {
-               return $this->getArticleId() != 0;
+               return $this->getArticleID() != 0;
        }
 
        /**

Modified: trunk/phase3/includes/WikiPage.php
===================================================================
--- trunk/phase3/includes/WikiPage.php  2012-03-11 21:45:54 UTC (rev 113592)
+++ trunk/phase3/includes/WikiPage.php  2012-03-11 22:05:54 UTC (rev 113593)
@@ -2022,7 +2022,7 @@
 
                # Now that it's safely backed up, delete it
                $dbw->delete( 'page', array( 'page_id' => $id ), __METHOD__ );
-               $ok = ( $dbw->affectedRows() > 0 ); // getArticleId() uses 
slave, could be laggy
+               $ok = ( $dbw->affectedRows() > 0 ); // getArticleID() uses 
slave, could be laggy
 
                if ( !$ok ) {
                        $dbw->rollback( __METHOD__ );

Modified: trunk/phase3/includes/actions/InfoAction.php
===================================================================
--- trunk/phase3/includes/actions/InfoAction.php        2012-03-11 21:45:54 UTC 
(rev 113592)
+++ trunk/phase3/includes/actions/InfoAction.php        2012-03-11 22:05:54 UTC 
(rev 113593)
@@ -107,7 +107,7 @@
         * @return mixed array or boolean false
         */
        public static function pageCountInfo( $title ) {
-               $id = $title->getArticleId();
+               $id = $title->getArticleID();
                $dbr = wfGetDB( DB_SLAVE );
 
                $watchers = (int)$dbr->selectField(

Modified: trunk/phase3/includes/cache/LinkBatch.php
===================================================================
--- trunk/phase3/includes/cache/LinkBatch.php   2012-03-11 21:45:54 UTC (rev 
113592)
+++ trunk/phase3/includes/cache/LinkBatch.php   2012-03-11 22:05:54 UTC (rev 
113593)
@@ -45,6 +45,11 @@
                }
        }
 
+       /**
+        * @param $ns int
+        * @param $dbkey string
+        * @return mixed
+        */
        public function add( $ns, $dbkey ) {
                if ( $ns < 0 ) {
                        return;


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

Reply via email to