Last modified: 2008-01-14 10:12:11 UTC

Wikimedia Bugzilla is closed!

Wikimedia has migrated from Bugzilla to Phabricator. Bug reports should be created and updated in Wikimedia Phabricator instead. Please create an account in Phabricator and add your Bugzilla email address to it.
Wikimedia Bugzilla is read-only. If you try to edit or create any bug report in Bugzilla you will be shown an intentional error message.
In order to access the Phabricator task corresponding to a Bugzilla report, just remove "static-" from its URL.
You could still run searches in Bugzilla or access your list of votes but bug reports will obviously not be up-to-date in Bugzilla.
Bug 12608 - Title->getDBkey() often spelled incorrectly
Title->getDBkey() often spelled incorrectly
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
All All
: Low enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
Depends on:
  Show dependency treegraph
Reported: 2008-01-13 11:37 UTC by Thomas Bleher
Modified: 2008-01-14 10:12 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Description Thomas Bleher 2008-01-13 11:37:40 UTC
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();
Comment 1 Roan Kattouw 2008-01-13 20:51:30 UTC
I thought PHP didn't mind?
Comment 2 Aaron Schulz 2008-01-13 20:52:24 UTC
It doesn't, but is nice to keep in consistent.
Comment 3 Thomas Bleher 2008-01-14 06:44:02 UTC
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.
Comment 4 Huji 2008-01-14 09:14:59 UTC
I did with r29719.
Comment 5 Huji 2008-01-14 09:20:07 UTC
Oops, seems like I missed a huge part. I'll do it shortly (the bug needs not to be reopened).
Comment 6 Huji 2008-01-14 09:27:24 UTC
All getDBKey and getDbKey are changed to getDBkey for the whole phase3 directory and its subdirectories now, with r29721.
Comment 7 Siebrand Mazeland 2008-01-14 10:12:11 UTC
All 'getD[bB]Key' replaced with 'getDBkey' in extension code in r29724.

Note You need to log in before you can comment on or make changes to this bug.