Page MenuHomePhabricator

Title->getDBkey() often spelled incorrectly
Closed, ResolvedPublic


getDBkey() is often spelled incorrectly in the source code as getDbKey() or getDBKey().

All these places are bugs, but I'm not sure if a simple search-and-replace is OK, as some other parts of the system may depend on the bugs, and I don't have time to look through all of them right now, so I'm posting them here (this is from a "grep getD[bB]Key"):

skins/disabled/MonoBookCBT.php: WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBKey()) .
includes/SquidUpdate.php: 'pl_title' => $title->getDbKey(),
includes/api/ApiQueryInfo.php: if(isset($prottitles[$title->getNamespace()][$title->getDbKey()]))
includes/api/ApiQueryInfo.php: $res['query']['pages'][$pageid]['protection'][] = $prottitles[$title->getNamespace()][$title->getDbKey()];
includes/Export.php: ' AND page_title=' . $this->db->addQuotes( $title->getDbKey() ) );
includes/AjaxFunctions.php: "page_title LIKE '". $db->strencode( $term_title->getDBKey() ) ."%'" ),
includes/SpecialRecentchangeslinked.php: $catkey = $dbr->addQuotes( $nt->getDBKey() );
includes/SpecialExport.php: $name = $title->getDBKey();
includes/SkinTemplate.php: WHERE wl_title='" . $dbr->strencode($this->mTitle->getDBKey()) .
includes/Linker.php: if( SpecialPage::exists( $nt->getDbKey() ) ) {
includes/Linker.php: $url = $upload->getLocalUrl( 'wpDestFile=' . urlencode( $title->getDbKey() ) );
includes/Skin.php: 'wgCanonicalSpecialPageName' => SpecialPage::resolveAlias( $wgTitle->getDBKey() ),
includes/Skin.php: WHERE wl_title='" . $dbr->strencode($wgTitle->getDBKey()) .
includes/SpecialImport.php: $this->origTitle->getDbKey() );
includes/SpecialUndelete.php: $encPrefix = $dbr->escapeLike( $title->getDbKey() );
includes/SpecialUndelete.php: array( 'fa_name' => $this->title->getDbKey() ),
includes/CategoryPage.php: 'cl_to' => $this->title->getDBKey()),
includes/Title.php: array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBKey()) );
includes/Title.php: list ($namespace, $title) = array( $this->getNamespace(), $this->getDBKey() );
includes/Title.php: array ('pt_namespace' => $this->getNamespace(), 'pt_title' => $this->getDBKey()), METHOD );
includes/Title.php: $name = $this->getDBKey();
includes/Title.php: "{$prefix}_title" => $this->getDbKey() ),
includes/Title.php: 'pl_title' => $nt->getDbKey() ),
includes/filerepo/ArchivedFile.php: $this->name = $title->getDBKey();
includes/filerepo/ArchivedFile.php: 'fa_name' => $this->title->getDBKey(),
maintenance/namespaceDupes.php: $newTitle->getDbKey(),
maintenance/namespaceDupes.php: "{$table}_title" => $newTitle->getDbKey(),
maintenance/cleanupImages.php: if( $title->getDbKey() !== $source ) {
maintenance/cleanupImages.php: $munged = $title->getDbKey();
maintenance/cleanupImages.php: if( is_null( $test ) || $test->getDbKey() !== $x ) {
maintenance/cleanupTitles.php: $dest = $title->getDbKey();
maintenance/cleanupTitles.php: $prior = $title->getDbKey();
maintenance/cleanupTitles.php: $dest = $title->getDbKey();

Version: 1.12.x
Severity: enhancement



Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 10:06 PM
bzimport set Reference to bz12608.
bzimport added a subscriber: Unknown Object (MLST).

It doesn't, but is nice to keep in consistent.

Oh, I didn't know that. Thanks for clearing it up :)
Setting severity accordingly.

I will commit a fix once I have some time, unless someone beats me to it.

Oops, seems like I missed a huge part. I'll do it shortly (the bug needs not to be reopened).

All getDBKey and getDbKey are changed to getDBkey for the whole phase3 directory and its subdirectories now, with r29721.

All 'getD[bB]Key' replaced with 'getDBkey' in extension code in r29724.