From db7d75fba7c04ec2f95019242f8c7d27a22d5dcf Mon Sep 17 00:00:00 2001 From: Huji Date: Mon, 14 Jan 2008 09:26:36 +0000 Subject: [PATCH] (bug 12608) (in continuation of r29719) Unifying the spelling of getDBkey() in the code. --- includes/Export.php | 2 +- includes/Linker.php | 4 ++-- includes/SpecialImport.php | 2 +- includes/SquidUpdate.php | 2 +- includes/Title.php | 4 ++-- includes/api/ApiQueryInfo.php | 4 ++-- includes/filerepo/ArchivedFile.php | 4 ++-- maintenance/cleanupImages.php | 6 +++--- maintenance/cleanupTitles.php | 6 +++--- maintenance/namespaceDupes.php | 4 ++-- skins/disabled/MonoBookCBT.php | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/includes/Export.php b/includes/Export.php index c3ef9451aa..69d88fc6bd 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -111,7 +111,7 @@ class WikiExporter { function pageByTitle( $title ) { return $this->dumpFrom( 'page_namespace=' . $title->getNamespace() . - ' AND page_title=' . $this->db->addQuotes( $title->getDbKey() ) ); + ' AND page_title=' . $this->db->addQuotes( $title->getDBkey() ) ); } function pageByName( $name ) { diff --git a/includes/Linker.php b/includes/Linker.php index 2c9446163f..e0dc1a7dd3 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -232,7 +232,7 @@ class Linker { # Handles links to special pages wich do not exist in the database: if( $nt->getNamespace() == NS_SPECIAL ) { - if( SpecialPage::exists( $nt->getDbKey() ) ) { + if( SpecialPage::exists( $nt->getDBkey() ) ) { $retVal = $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix ); } else { $retVal = $this->makeBrokenLinkObj( $nt, $text, $query, $trail, $prefix ); @@ -767,7 +767,7 @@ class Linker { $class = 'internal'; } else { $upload = SpecialPage::getTitleFor( 'Upload' ); - $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDbKey() ) ); + $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDBkey() ) ); $class = 'new'; } $alt = htmlspecialchars( $title->getText() ); diff --git a/includes/SpecialImport.php b/includes/SpecialImport.php index df6ba6e808..9f4634be6f 100644 --- a/includes/SpecialImport.php +++ b/includes/SpecialImport.php @@ -682,7 +682,7 @@ class WikiImporter { $this->origTitle = Title::newFromText( $this->workTitle ); if( !is_null( $this->mTargetNamespace ) && !is_null( $this->origTitle ) ) { $this->pageTitle = Title::makeTitle( $this->mTargetNamespace, - $this->origTitle->getDbKey() ); + $this->origTitle->getDBkey() ); } else { $this->pageTitle = Title::newFromText( $this->workTitle ); } diff --git a/includes/SquidUpdate.php b/includes/SquidUpdate.php index 5d7350a914..db2750cd66 100644 --- a/includes/SquidUpdate.php +++ b/includes/SquidUpdate.php @@ -32,7 +32,7 @@ class SquidUpdate { array( 'page_namespace', 'page_title' ), array( 'pl_namespace' => $title->getNamespace(), - 'pl_title' => $title->getDbKey(), + 'pl_title' => $title->getDBkey(), 'pl_from=page_id' ), $fname ); $blurlArr = $title->getSquidURLs(); diff --git a/includes/Title.php b/includes/Title.php index 32f657551a..517941b958 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -2147,7 +2147,7 @@ class Title { array( "{$prefix}_from=page_id", "{$prefix}_namespace" => $this->getNamespace(), - "{$prefix}_title" => $this->getDbKey() ), + "{$prefix}_title" => $this->getDBkey() ), 'Title::getLinksTo', $options ); @@ -2490,7 +2490,7 @@ class Title { array( 'pl_from' => $newid, 'pl_namespace' => $nt->getNamespace(), - 'pl_title' => $nt->getDbKey() ), + 'pl_title' => $nt->getDBkey() ), $fname ); } diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index 4c90f8dcbd..6664048e95 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -204,8 +204,8 @@ class ApiQueryInfo extends ApiQueryBase { { // Apparently the XML formatting code doesn't like array(null) // This is painful to fix, so we'll just work around it - if(isset($prottitles[$title->getNamespace()][$title->getDbKey()])) - $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][$title->getDbKey()]; + if(isset($prottitles[$title->getNamespace()][$title->getDBkey()])) + $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][$title->getDBkey()]; else $res['query']['pages'][$pageid]['protection'] = array(); $result->setIndexedTagName($res['query']['pages'][$pageid]['protection'], 'pr'); diff --git a/includes/filerepo/ArchivedFile.php b/includes/filerepo/ArchivedFile.php index 29dcbc8670..cc70b26d10 100644 --- a/includes/filerepo/ArchivedFile.php +++ b/includes/filerepo/ArchivedFile.php @@ -35,7 +35,7 @@ class ArchivedFile } $this->id = -1; $this->title = $title; - $this->name = $title->getDBKey(); + $this->name = $title->getDBkey(); $this->group = ''; $this->key = ''; $this->size = 0; @@ -85,7 +85,7 @@ class ArchivedFile 'fa_timestamp', 'fa_deleted' ), array( - 'fa_name' => $this->title->getDBKey(), + 'fa_name' => $this->title->getDBkey(), $conds ), __METHOD__, array( 'ORDER BY' => 'fa_timestamp DESC' ) ); diff --git a/maintenance/cleanupImages.php b/maintenance/cleanupImages.php index 1c0edeb57a..d6ed5a7a63 100644 --- a/maintenance/cleanupImages.php +++ b/maintenance/cleanupImages.php @@ -66,8 +66,8 @@ class ImageCleanup extends TableCleanup { return $this->progress( 1 ); } - if( $title->getDbKey() !== $source ) { - $munged = $title->getDbKey(); + if( $title->getDBkey() !== $source ) { + $munged = $title->getDBkey(); $this->log( "page $source ($munged) doesn't match self." ); $this->pokeFile( $source, $munged ); return $this->progress( 1 ); @@ -154,7 +154,7 @@ class ImageCleanup extends TableCleanup { $name ); $test = Title::makeTitleSafe( NS_IMAGE, $x ); - if( is_null( $test ) || $test->getDbKey() !== $x ) { + if( is_null( $test ) || $test->getDBkey() !== $x ) { $this->log( "Unable to generate safe title from '$name', got '$x'" ); return false; } diff --git a/maintenance/cleanupTitles.php b/maintenance/cleanupTitles.php index 0ec57d4eee..1f06b1659d 100644 --- a/maintenance/cleanupTitles.php +++ b/maintenance/cleanupTitles.php @@ -79,7 +79,7 @@ class TitleCleanup extends TableCleanup { $title = Title::newFromText( $clean ); } - $dest = $title->getDbKey(); + $dest = $title->getDBkey(); if( $this->dryrun ) { $this->log( "DRY RUN: would rename $row->page_id ($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')" ); } else { @@ -97,7 +97,7 @@ class TitleCleanup extends TableCleanup { if( $title->getInterwiki() ) { $prior = $title->getPrefixedDbKey(); } else { - $prior = $title->getDbKey(); + $prior = $title->getDBkey(); } $clean = 'Broken/' . $prior; $verified = Title::makeTitleSafe( $row->page_namespace, $clean ); @@ -112,7 +112,7 @@ class TitleCleanup extends TableCleanup { wfDie( "Something awry; empty title.\n" ); } $ns = $title->getNamespace(); - $dest = $title->getDbKey(); + $dest = $title->getDBkey(); if( $this->dryrun ) { $this->log( "DRY RUN: would rename $row->page_id ($row->page_namespace,'$row->page_title') to ($row->page_namespace,'$dest')" ); } else { diff --git a/maintenance/namespaceDupes.php b/maintenance/namespaceDupes.php index d758a8581b..2b213e9992 100644 --- a/maintenance/namespaceDupes.php +++ b/maintenance/namespaceDupes.php @@ -204,7 +204,7 @@ class NamespaceConflictChecker { $row->id, $row->oldtitle, $newTitle->getNamespace(), - $newTitle->getDbKey(), + $newTitle->getDBkey(), $newTitle->getPrefixedText() ); $id = $newTitle->getArticleId(); @@ -235,7 +235,7 @@ class NamespaceConflictChecker { $this->db->update( $table, array( "{$table}_namespace" => $newTitle->getNamespace(), - "{$table}_title" => $newTitle->getDbKey(), + "{$table}_title" => $newTitle->getDBkey(), ), array( "{$table}_namespace" => 0, diff --git a/skins/disabled/MonoBookCBT.php b/skins/disabled/MonoBookCBT.php index 03e5f070b6..c6297cd9d3 100644 --- a/skins/disabled/MonoBookCBT.php +++ b/skins/disabled/MonoBookCBT.php @@ -1020,7 +1020,7 @@ class SkinMonoBookCBT extends SkinTemplate { $dbr = wfGetDB( DB_SLAVE ); extract( $dbr->tableNames( 'watchlist' ) ); $sql = "SELECT COUNT(*) AS n FROM $watchlist - WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBKey()) . + WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBkey()) . "' AND wl_namespace=" . $this->mTitle->getNamespace() ; $res = $dbr->query( $sql, 'SkinTemplate::outputPage'); $row = $dbr->fetchObject( $res ); -- 2.20.1