Index: trunk/phase3/includes/Title.php |
— | — | @@ -2538,7 +2538,7 @@ |
2539 | 2539 | |
2540 | 2540 | if ( $oldFashionedRestrictions === null ) { |
2541 | 2541 | $oldFashionedRestrictions = $dbr->selectField( 'page', 'page_restrictions', |
2542 | | - array( 'page_id' => $this->getArticleId() ), __METHOD__ ); |
| 2542 | + array( 'page_id' => $this->getArticleID() ), __METHOD__ ); |
2543 | 2543 | } |
2544 | 2544 | |
2545 | 2545 | if ( $oldFashionedRestrictions != '' ) { |
— | — | @@ -2609,7 +2609,7 @@ |
2610 | 2610 | $res = $dbr->select( |
2611 | 2611 | 'page_restrictions', |
2612 | 2612 | '*', |
2613 | | - array( 'pr_page' => $this->getArticleId() ), |
| 2613 | + array( 'pr_page' => $this->getArticleID() ), |
2614 | 2614 | __METHOD__ |
2615 | 2615 | ); |
2616 | 2616 | |
— | — | @@ -3167,7 +3167,7 @@ |
3168 | 3168 | * @return Array of Title objects linking here |
3169 | 3169 | */ |
3170 | 3170 | public function getLinksFrom( $options = array(), $table = 'pagelinks', $prefix = 'pl' ) { |
3171 | | - $id = $this->getArticleId(); |
| 3171 | + $id = $this->getArticleID(); |
3172 | 3172 | |
3173 | 3173 | # If the page doesn't exist; there can't be any link from this page |
3174 | 3174 | if ( !$id ) { |
— | — | @@ -3231,7 +3231,7 @@ |
3232 | 3232 | * @return Array of Title the Title objects |
3233 | 3233 | */ |
3234 | 3234 | public function getBrokenLinksFrom() { |
3235 | | - if ( $this->getArticleId() == 0 ) { |
| 3235 | + if ( $this->getArticleID() == 0 ) { |
3236 | 3236 | # All links from article ID 0 are false positives |
3237 | 3237 | return array(); |
3238 | 3238 | } |
— | — | @@ -3241,7 +3241,7 @@ |
3242 | 3242 | array( 'page', 'pagelinks' ), |
3243 | 3243 | array( 'pl_namespace', 'pl_title' ), |
3244 | 3244 | array( |
3245 | | - 'pl_from' => $this->getArticleId(), |
| 3245 | + 'pl_from' => $this->getArticleID(), |
3246 | 3246 | 'page_namespace IS NULL' |
3247 | 3247 | ), |
3248 | 3248 | __METHOD__, array(), |
— | — | @@ -3714,8 +3714,8 @@ |
3715 | 3715 | // We don't know whether this function was called before |
3716 | 3716 | // or after moving the root page, so check both |
3717 | 3717 | // $this and $nt |
3718 | | - if ( $oldSubpage->getArticleId() == $this->getArticleId() || |
3719 | | - $oldSubpage->getArticleID() == $nt->getArticleId() ) |
| 3718 | + if ( $oldSubpage->getArticleID() == $this->getArticleID() || |
| 3719 | + $oldSubpage->getArticleID() == $nt->getArticleID() ) |
3720 | 3720 | { |
3721 | 3721 | // When moving a page to a subpage of itself, |
3722 | 3722 | // don't move it twice |
— | — | @@ -3839,7 +3839,7 @@ |
3840 | 3840 | |
3841 | 3841 | $data = array(); |
3842 | 3842 | |
3843 | | - $titleKey = $this->getArticleId(); |
| 3843 | + $titleKey = $this->getArticleID(); |
3844 | 3844 | |
3845 | 3845 | if ( $titleKey === 0 ) { |
3846 | 3846 | return $data; |
— | — | @@ -3917,7 +3917,7 @@ |
3918 | 3918 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
3919 | 3919 | return $db->selectField( 'revision', 'rev_id', |
3920 | 3920 | array( |
3921 | | - 'rev_page' => $this->getArticleId( $flags ), |
| 3921 | + 'rev_page' => $this->getArticleID( $flags ), |
3922 | 3922 | 'rev_id < ' . intval( $revId ) |
3923 | 3923 | ), |
3924 | 3924 | __METHOD__, |
— | — | @@ -3936,7 +3936,7 @@ |
3937 | 3937 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
3938 | 3938 | return $db->selectField( 'revision', 'rev_id', |
3939 | 3939 | array( |
3940 | | - 'rev_page' => $this->getArticleId( $flags ), |
| 3940 | + 'rev_page' => $this->getArticleID( $flags ), |
3941 | 3941 | 'rev_id > ' . intval( $revId ) |
3942 | 3942 | ), |
3943 | 3943 | __METHOD__, |
— | — | @@ -3951,7 +3951,7 @@ |
3952 | 3952 | * @return Revision|Null if page doesn't exist |
3953 | 3953 | */ |
3954 | 3954 | public function getFirstRevision( $flags = 0 ) { |
3955 | | - $pageId = $this->getArticleId( $flags ); |
| 3955 | + $pageId = $this->getArticleID( $flags ); |
3956 | 3956 | if ( $pageId ) { |
3957 | 3957 | $db = ( $flags & self::GAID_FOR_UPDATE ) ? wfGetDB( DB_MASTER ) : wfGetDB( DB_SLAVE ); |
3958 | 3958 | $row = $db->selectRow( 'revision', '*', |
— | — | @@ -4016,7 +4016,7 @@ |
4017 | 4017 | if ( $this->mEstimateRevisions === null ) { |
4018 | 4018 | $dbr = wfGetDB( DB_SLAVE ); |
4019 | 4019 | $this->mEstimateRevisions = $dbr->estimateRowCount( 'revision', '*', |
4020 | | - array( 'rev_page' => $this->getArticleId() ), __METHOD__ ); |
| 4020 | + array( 'rev_page' => $this->getArticleID() ), __METHOD__ ); |
4021 | 4021 | } |
4022 | 4022 | |
4023 | 4023 | return $this->mEstimateRevisions; |
— | — | @@ -4043,7 +4043,7 @@ |
4044 | 4044 | $dbr = wfGetDB( DB_SLAVE ); |
4045 | 4045 | return (int)$dbr->selectField( 'revision', 'count(*)', |
4046 | 4046 | array( |
4047 | | - 'rev_page' => $this->getArticleId(), |
| 4047 | + 'rev_page' => $this->getArticleID(), |
4048 | 4048 | 'rev_timestamp > ' . $dbr->addQuotes( $dbr->timestamp( $old->getTimestamp() ) ), |
4049 | 4049 | 'rev_timestamp < ' . $dbr->addQuotes( $dbr->timestamp( $new->getTimestamp() ) ) |
4050 | 4050 | ), |
— | — | @@ -4117,7 +4117,7 @@ |
4118 | 4118 | * @return Bool |
4119 | 4119 | */ |
4120 | 4120 | public function exists() { |
4121 | | - return $this->getArticleId() != 0; |
| 4121 | + return $this->getArticleID() != 0; |
4122 | 4122 | } |
4123 | 4123 | |
4124 | 4124 | /** |
Index: trunk/phase3/includes/actions/InfoAction.php |
— | — | @@ -107,7 +107,7 @@ |
108 | 108 | * @return mixed array or boolean false |
109 | 109 | */ |
110 | 110 | public static function pageCountInfo( $title ) { |
111 | | - $id = $title->getArticleId(); |
| 111 | + $id = $title->getArticleID(); |
112 | 112 | $dbr = wfGetDB( DB_SLAVE ); |
113 | 113 | |
114 | 114 | $watchers = (int)$dbr->selectField( |
Index: trunk/phase3/includes/SkinTemplate.php |
— | — | @@ -216,7 +216,7 @@ |
217 | 217 | $tpl->setRef( 'thispage', $this->thispage ); |
218 | 218 | $tpl->setRef( 'titleprefixeddbkey', $this->thispage ); |
219 | 219 | $tpl->set( 'titletext', $title->getText() ); |
220 | | - $tpl->set( 'articleid', $title->getArticleId() ); |
| 220 | + $tpl->set( 'articleid', $title->getArticleID() ); |
221 | 221 | |
222 | 222 | $tpl->set( 'isarticle', $out->isArticle() ); |
223 | 223 | |
— | — | @@ -1173,7 +1173,7 @@ |
1174 | 1174 | $nav_urls['whatlinkshere'] = array( |
1175 | 1175 | 'href' => SpecialPage::getTitleFor( 'Whatlinkshere', $this->thispage )->getLocalUrl() |
1176 | 1176 | ); |
1177 | | - if ( $this->getTitle()->getArticleId() ) { |
| 1177 | + if ( $this->getTitle()->getArticleID() ) { |
1178 | 1178 | $nav_urls['recentchangeslinked'] = array( |
1179 | 1179 | 'href' => SpecialPage::getTitleFor( 'Recentchangeslinked', $this->thispage )->getLocalUrl() |
1180 | 1180 | ); |
Index: trunk/phase3/includes/Skin.php |
— | — | @@ -662,7 +662,7 @@ |
663 | 663 | $action = $this->getRequest()->getVal( 'action', 'view' ); |
664 | 664 | |
665 | 665 | if ( $this->getUser()->isAllowed( 'deletedhistory' ) && |
666 | | - ( $this->getTitle()->getArticleId() == 0 || $action == 'history' ) ) { |
| 666 | + ( $this->getTitle()->getArticleID() == 0 || $action == 'history' ) ) { |
667 | 667 | $n = $this->getTitle()->isDeleted(); |
668 | 668 | |
669 | 669 | |
Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -376,7 +376,7 @@ |
377 | 377 | wfProfileOut( __METHOD__ ); |
378 | 378 | return; |
379 | 379 | } |
380 | | - if ( !$this->mTitle->getArticleId() ) |
| 380 | + if ( !$this->mTitle->getArticleID() ) |
381 | 381 | wfRunHooks( 'EditFormPreloadText', array( &$this->textbox1, &$this->mTitle ) ); |
382 | 382 | else |
383 | 383 | wfRunHooks( 'EditFormInitialText', array( $this ) ); |
— | — | @@ -805,7 +805,7 @@ |
806 | 806 | # Otherwise, $text will be left as-is. |
807 | 807 | if ( !is_null( $undorev ) && !is_null( $oldrev ) && |
808 | 808 | $undorev->getPage() == $oldrev->getPage() && |
809 | | - $undorev->getPage() == $this->mTitle->getArticleId() && |
| 809 | + $undorev->getPage() == $this->mTitle->getArticleID() && |
810 | 810 | !$undorev->isDeleted( Revision::DELETED_TEXT ) && |
811 | 811 | !$oldrev->isDeleted( Revision::DELETED_TEXT ) ) { |
812 | 812 | |
— | — | @@ -1478,7 +1478,7 @@ |
1479 | 1479 | $res = $dbw->select( 'revision', |
1480 | 1480 | 'rev_user', |
1481 | 1481 | array( |
1482 | | - 'rev_page' => $this->mTitle->getArticleId(), |
| 1482 | + 'rev_page' => $this->mTitle->getArticleID(), |
1483 | 1483 | 'rev_timestamp > ' . $dbw->addQuotes( $dbw->timestamp( $edittime ) ) |
1484 | 1484 | ), |
1485 | 1485 | __METHOD__, |
Index: trunk/phase3/includes/SkinLegacy.php |
— | — | @@ -324,7 +324,7 @@ |
325 | 325 | |
326 | 326 | $s = implode( $element, $sep ); |
327 | 327 | |
328 | | - if ( $title->getArticleId() ) { |
| 328 | + if ( $title->getArticleID() ) { |
329 | 329 | $s .= "\n<br />"; |
330 | 330 | |
331 | 331 | // Delete/protect/move links for privileged users |
— | — | @@ -573,7 +573,7 @@ |
574 | 574 | $diff = $wgRequest->getVal( 'diff' ); |
575 | 575 | $title = $this->getSkin()->getTitle(); |
576 | 576 | |
577 | | - if ( $title->getArticleId() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) { |
| 577 | + if ( $title->getArticleID() && ( !$diff ) && $wgUser->isAllowed( 'delete' ) ) { |
578 | 578 | $t = wfMsg( 'deletethispage' ); |
579 | 579 | |
580 | 580 | $s = Linker::linkKnown( |
— | — | @@ -595,7 +595,7 @@ |
596 | 596 | $diff = $wgRequest->getVal( 'diff' ); |
597 | 597 | $title = $this->getSkin()->getTitle(); |
598 | 598 | |
599 | | - if ( $title->getArticleId() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) { |
| 599 | + if ( $title->getArticleID() && ( ! $diff ) && $wgUser->isAllowed( 'protect' ) ) { |
600 | 600 | if ( $title->isProtected() ) { |
601 | 601 | $text = wfMsg( 'unprotectthispage' ); |
602 | 602 | $query = array( 'action' => 'unprotect' ); |
Index: trunk/phase3/includes/cache/LinkBatch.php |
— | — | @@ -45,6 +45,11 @@ |
46 | 46 | } |
47 | 47 | } |
48 | 48 | |
| 49 | + /** |
| 50 | + * @param $ns int |
| 51 | + * @param $dbkey string |
| 52 | + * @return mixed |
| 53 | + */ |
49 | 54 | public function add( $ns, $dbkey ) { |
50 | 55 | if ( $ns < 0 ) { |
51 | 56 | return; |
Index: trunk/phase3/includes/Revision.php |
— | — | @@ -1185,7 +1185,7 @@ |
1186 | 1186 | $id = 0; |
1187 | 1187 | } |
1188 | 1188 | $conds = array( 'rev_id' => $id ); |
1189 | | - $conds['rev_page'] = $title->getArticleId(); |
| 1189 | + $conds['rev_page'] = $title->getArticleID(); |
1190 | 1190 | $timestamp = $dbr->selectField( 'revision', 'rev_timestamp', $conds, __METHOD__ ); |
1191 | 1191 | if ( $timestamp === false && wfGetLB()->getServerCount() > 1 ) { |
1192 | 1192 | # Not in slave, try master |
— | — | @@ -1219,7 +1219,7 @@ |
1220 | 1220 | * @return Integer |
1221 | 1221 | */ |
1222 | 1222 | static function countByTitle( $db, $title ) { |
1223 | | - $id = $title->getArticleId(); |
| 1223 | + $id = $title->getArticleID(); |
1224 | 1224 | if( $id ) { |
1225 | 1225 | return Revision::countByPageId( $db, $id ); |
1226 | 1226 | } |
Index: trunk/phase3/includes/WikiPage.php |
— | — | @@ -2022,7 +2022,7 @@ |
2023 | 2023 | |
2024 | 2024 | # Now that it's safely backed up, delete it |
2025 | 2025 | $dbw->delete( 'page', array( 'page_id' => $id ), __METHOD__ ); |
2026 | | - $ok = ( $dbw->affectedRows() > 0 ); // getArticleId() uses slave, could be laggy |
| 2026 | + $ok = ( $dbw->affectedRows() > 0 ); // getArticleID() uses slave, could be laggy |
2027 | 2027 | |
2028 | 2028 | if ( !$ok ) { |
2029 | 2029 | $dbw->rollback( __METHOD__ ); |