(bug 12608) (in continuation of r29719) Unifying the spelling of getDBkey() in the...
authorHuji <huji@users.mediawiki.org>
Mon, 14 Jan 2008 09:26:36 +0000 (09:26 +0000)
committerHuji <huji@users.mediawiki.org>
Mon, 14 Jan 2008 09:26:36 +0000 (09:26 +0000)
includes/Export.php
includes/Linker.php
includes/SpecialImport.php
includes/SquidUpdate.php
includes/Title.php
includes/api/ApiQueryInfo.php
includes/filerepo/ArchivedFile.php
maintenance/cleanupImages.php
maintenance/cleanupTitles.php
maintenance/namespaceDupes.php
skins/disabled/MonoBookCBT.php

index c3ef945..69d88fc 100644 (file)
@@ -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 ) {
index 2c94461..e0dc1a7 100644 (file)
@@ -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() );
index df6ba6e..9f4634b 100644 (file)
@@ -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 );
                        }
index 5d7350a..db2750c 100644 (file)
@@ -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();
index 32f6575..517941b 100644 (file)
@@ -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 );
                }
                
index 4c90f8d..6664048 100644 (file)
@@ -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');
index 29dcbc8..cc70b26 100644 (file)
@@ -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' ) );
index 1c0edeb..d6ed5a7 100644 (file)
@@ -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;
                }
index 0ec57d4..1f06b16 100644 (file)
@@ -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 {
index d758a85..2b213e9 100644 (file)
@@ -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,
index 03e5f07..c6297cd 100644 (file)
@@ -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 );