Correct case of Title::getPrefixedDBkey() calls
Change-Id: Ic9ef0cc6dbb0a8eb0ee93432299ef59759223e2c
This commit is contained in:
parent
c8543fe0bf
commit
cd4dd7ca85
14 changed files with 23 additions and 23 deletions
|
|
@ -225,7 +225,7 @@ class WikiImporter {
|
|||
} else {
|
||||
// set namespace to 'all', so the namespace check in processTitle() can passed
|
||||
$this->setTargetNamespace( null );
|
||||
$this->mTargetRootPage = $title->getPrefixedDBKey();
|
||||
$this->mTargetRootPage = $title->getPrefixedDBkey();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3008,7 +3008,7 @@ $templates
|
|||
'wgCanonicalNamespace' => $nsname,
|
||||
'wgCanonicalSpecialPageName' => $canonicalName,
|
||||
'wgNamespaceNumber' => $title->getNamespace(),
|
||||
'wgPageName' => $title->getPrefixedDBKey(),
|
||||
'wgPageName' => $title->getPrefixedDBkey(),
|
||||
'wgTitle' => $title->getText(),
|
||||
'wgCurRevisionId' => $latestRevID,
|
||||
'wgArticleId' => $pageID,
|
||||
|
|
@ -3024,7 +3024,7 @@ $templates
|
|||
'wgDefaultDateFormat' => $lang->getDefaultDateFormat(),
|
||||
'wgMonthNames' => $lang->getMonthNamesArray(),
|
||||
'wgMonthNamesShort' => $lang->getMonthAbbreviationsArray(),
|
||||
'wgRelevantPageName' => $relevantTitle->getPrefixedDBKey(),
|
||||
'wgRelevantPageName' => $relevantTitle->getPrefixedDBkey(),
|
||||
);
|
||||
if ( $user->isLoggedIn() ) {
|
||||
$vars['wgUserId'] = $user->getId();
|
||||
|
|
@ -3042,7 +3042,7 @@ $templates
|
|||
$vars['wgIsMainPage'] = true;
|
||||
}
|
||||
if ( $this->mRedirectedFrom ) {
|
||||
$vars['wgRedirectedFrom'] = $this->mRedirectedFrom->getPrefixedDBKey();
|
||||
$vars['wgRedirectedFrom'] = $this->mRedirectedFrom->getPrefixedDBkey();
|
||||
}
|
||||
|
||||
// Allow extensions to add their custom variables to the mw.config map.
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ class SkinTemplate extends Skin {
|
|||
$tpl->set( 'helppage', $this->msg( 'helppage' )->text() );
|
||||
*/
|
||||
$tpl->set( 'searchaction', $this->escapeSearchLink() );
|
||||
$tpl->set( 'searchtitle', SpecialPage::getTitleFor( 'Search' )->getPrefixedDBKey() );
|
||||
$tpl->set( 'searchtitle', SpecialPage::getTitleFor( 'Search' )->getPrefixedDBkey() );
|
||||
$tpl->set( 'search', trim( $request->getVal( 'search' ) ) );
|
||||
$tpl->setRef( 'stylepath', $wgStylePath );
|
||||
$tpl->setRef( 'articlepath', $wgArticlePath );
|
||||
|
|
|
|||
|
|
@ -2140,7 +2140,7 @@ class Title {
|
|||
# Time to check the whitelist
|
||||
# Only do these checks is there's something to check against
|
||||
$name = $this->getPrefixedText();
|
||||
$dbName = $this->getPrefixedDBKey();
|
||||
$dbName = $this->getPrefixedDBkey();
|
||||
|
||||
// Check for explicit whitelisting with and without underscores
|
||||
if ( in_array( $name, $wgWhitelistRead, true ) || in_array( $dbName, $wgWhitelistRead, true ) ) {
|
||||
|
|
|
|||
|
|
@ -247,7 +247,7 @@ class MediaWiki {
|
|||
// Redirect loops, no title in URL, $wgUsePathInfo URLs, and URLs with a variant
|
||||
} elseif ( $request->getVal( 'action', 'view' ) == 'view' && !$request->wasPosted()
|
||||
&& ( $request->getVal( 'title' ) === null ||
|
||||
$title->getPrefixedDBKey() != $request->getVal( 'title' ) )
|
||||
$title->getPrefixedDBkey() != $request->getVal( 'title' ) )
|
||||
&& !count( $request->getValueNames( array( 'action', 'title' ) ) )
|
||||
&& wfRunHooks( 'TestCanonicalRedirect', array( $request, $title, $output ) ) )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ class HistoryAction extends FormlessAction {
|
|||
false,
|
||||
array( 'id' => 'mw-history-search' )
|
||||
) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDBKey() ) . "\n" .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n" .
|
||||
Html::hidden( 'action', 'history' ) . "\n" .
|
||||
Xml::dateMenu( ( $year == null ? date( "Y" ) : $year ), $month ) . ' ' .
|
||||
( $tagSelector ? ( implode( ' ', $tagSelector ) . ' ' ) : '' ) .
|
||||
|
|
@ -440,7 +440,7 @@ class HistoryPager extends ReverseChronologicalPager {
|
|||
$this->getOutput()->wrapWikiMsg( "<div class='mw-history-legend'>\n$1\n</div>", 'histlegend' );
|
||||
$s = Html::openElement( 'form', array( 'action' => $wgScript,
|
||||
'id' => 'mw-history-compare' ) ) . "\n";
|
||||
$s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . "\n";
|
||||
$s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) . "\n";
|
||||
$s .= Html::hidden( 'action', 'historysubmit' ) . "\n";
|
||||
|
||||
// Button container stored in $this->buttons for re-use in getEndBody()
|
||||
|
|
@ -580,7 +580,7 @@ class HistoryPager extends ReverseChronologicalPager {
|
|||
// Otherwise, show the link...
|
||||
} else {
|
||||
$query = array( 'type' => 'revision',
|
||||
'target' => $this->getTitle()->getPrefixedDbkey(), 'ids' => $rev->getId() );
|
||||
'target' => $this->getTitle()->getPrefixedDBkey(), 'ids' => $rev->getId() );
|
||||
$del .= Linker::revDeleteLink( $query,
|
||||
$rev->isDeleted( Revision::DELETED_RESTRICTED ), false );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ abstract class ApiQueryBase extends ApiBase {
|
|||
if ( !$t ) {
|
||||
$this->dieUsageMsg( array( 'invalidtitle', $title ) );
|
||||
}
|
||||
return $t->getPrefixedDbKey();
|
||||
return $t->getPrefixedDBkey();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
10
includes/cache/LinkCache.php
vendored
10
includes/cache/LinkCache.php
vendored
|
|
@ -78,7 +78,7 @@ class LinkCache {
|
|||
* @return mixed
|
||||
*/
|
||||
public function getGoodLinkFieldObj( $title, $field ) {
|
||||
$dbkey = $title->getPrefixedDbKey();
|
||||
$dbkey = $title->getPrefixedDBkey();
|
||||
if ( array_key_exists( $dbkey, $this->mGoodLinkFields ) ) {
|
||||
return $this->mGoodLinkFields[$dbkey][$field];
|
||||
} else {
|
||||
|
|
@ -105,7 +105,7 @@ class LinkCache {
|
|||
* @param $model Integer: latest revision's content model ID
|
||||
*/
|
||||
public function addGoodLinkObj( $id, $title, $len = -1, $redir = null, $revision = false, $model = false ) {
|
||||
$dbkey = $title->getPrefixedDbKey();
|
||||
$dbkey = $title->getPrefixedDBkey();
|
||||
$this->mGoodLinks[$dbkey] = intval( $id );
|
||||
$this->mGoodLinkFields[$dbkey] = array(
|
||||
'length' => intval( $len ),
|
||||
|
|
@ -122,7 +122,7 @@ class LinkCache {
|
|||
* page_latest and page_content_model
|
||||
*/
|
||||
public function addGoodLinkObjFromRow( $title, $row ) {
|
||||
$dbkey = $title->getPrefixedDbKey();
|
||||
$dbkey = $title->getPrefixedDBkey();
|
||||
$this->mGoodLinks[$dbkey] = intval( $row->page_id );
|
||||
$this->mGoodLinkFields[$dbkey] = array(
|
||||
'length' => intval( $row->page_len ),
|
||||
|
|
@ -136,7 +136,7 @@ class LinkCache {
|
|||
* @param $title Title
|
||||
*/
|
||||
public function addBadLinkObj( $title ) {
|
||||
$dbkey = $title->getPrefixedDbKey();
|
||||
$dbkey = $title->getPrefixedDBkey();
|
||||
if ( !$this->isBadLink( $dbkey ) ) {
|
||||
$this->mBadLinks[$dbkey] = 1;
|
||||
}
|
||||
|
|
@ -150,7 +150,7 @@ class LinkCache {
|
|||
* @param $title Title
|
||||
*/
|
||||
public function clearLink( $title ) {
|
||||
$dbkey = $title->getPrefixedDbKey();
|
||||
$dbkey = $title->getPrefixedDBkey();
|
||||
unset( $this->mBadLinks[$dbkey] );
|
||||
unset( $this->mGoodLinks[$dbkey] );
|
||||
unset( $this->mGoodLinkFields[$dbkey] );
|
||||
|
|
|
|||
|
|
@ -992,7 +992,7 @@ class DeleteLogFormatter extends LogFormatter {
|
|||
$this->msg( 'diff' )->escaped(),
|
||||
array(),
|
||||
array(
|
||||
'target' => $this->entry->getTarget()->getPrefixedDBKey(),
|
||||
'target' => $this->entry->getTarget()->getPrefixedDBkey(),
|
||||
'diff' => 'prev',
|
||||
'timestamp' => $ids[0]
|
||||
)
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class FileDuplicateSearchPage extends QueryPage {
|
|||
# Create the input form
|
||||
$out->addHTML(
|
||||
Xml::openElement( 'form', array( 'id' => 'fileduplicatesearch', 'method' => 'get', 'action' => $wgScript ) ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
|
||||
Xml::openElement( 'fieldset' ) .
|
||||
Xml::element( 'legend', null, $this->msg( 'fileduplicatesearch-legend' )->text() ) .
|
||||
Xml::inputLabel( $this->msg( 'fileduplicatesearch-filename' )->text(), 'filename', 'filename', 50, $this->filename ) . ' ' .
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class LinkSearchPage extends QueryPage {
|
|||
count( $protocols_list )
|
||||
);
|
||||
$s = Xml::openElement( 'form', array( 'id' => 'mw-linksearch-form', 'method' => 'get', 'action' => $GLOBALS['wgScript'] ) ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
|
||||
'<fieldset>' .
|
||||
Xml::element( 'legend', array(), $this->msg( 'linksearch' )->text() ) .
|
||||
Xml::inputLabel( $this->msg( 'linksearch-pat' )->text(), 'target', 'target', 50, $target ) . ' ';
|
||||
|
|
|
|||
|
|
@ -141,7 +141,7 @@ class SpecialMergeHistory extends SpecialPage {
|
|||
'<fieldset>' .
|
||||
Xml::element( 'legend', array(),
|
||||
$this->msg( 'mergehistory-box' )->text() ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) .
|
||||
Html::hidden( 'title', $this->getTitle()->getPrefixedDBkey() ) .
|
||||
Html::hidden( 'submitted', '1' ) .
|
||||
Html::hidden( 'mergepoint', $this->mTimestamp ) .
|
||||
Xml::openElement( 'table' ) .
|
||||
|
|
|
|||
|
|
@ -783,7 +783,7 @@ class SpecialUndelete extends SpecialPage {
|
|||
'action' => $wgScript ) ) .
|
||||
Xml::fieldset( $this->msg( 'undelete-search-box' )->text() ) .
|
||||
Html::hidden( 'title',
|
||||
$this->getTitle()->getPrefixedDbKey() ) .
|
||||
$this->getTitle()->getPrefixedDBkey() ) .
|
||||
Xml::inputLabel( $this->msg( 'undelete-search-prefix' )->text(),
|
||||
'prefix', 'prefix', 20,
|
||||
$this->mSearchPrefix ) . ' ' .
|
||||
|
|
@ -967,7 +967,7 @@ class SpecialUndelete extends SpecialPage {
|
|||
Xml::element( 'input', array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'target',
|
||||
'value' => $this->mTargetObj->getPrefixedDbKey() ) ) .
|
||||
'value' => $this->mTargetObj->getPrefixedDBkey() ) ) .
|
||||
Xml::element( 'input', array(
|
||||
'type' => 'hidden',
|
||||
'name' => 'timestamp',
|
||||
|
|
|
|||
|
|
@ -114,7 +114,7 @@ class TitleCleanup extends TableCleanup {
|
|||
protected function moveInconsistentPage( $row, $title ) {
|
||||
if ( $title->exists() || $title->getInterwiki() || !$title->canExist() ) {
|
||||
if ( $title->getInterwiki() || !$title->canExist() ) {
|
||||
$prior = $title->getPrefixedDbKey();
|
||||
$prior = $title->getPrefixedDBkey();
|
||||
} else {
|
||||
$prior = $title->getDBkey();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue