r17039 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r17038‎ | r17039 | r17040 >
Date:02:14, 16 October 2006
Author:yurik
Status:old
Tags:
Comment:
* API: fixed titleToKey() to convert values to upper case.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -74,7 +74,15 @@
7575 return $this->mQueryModule->getPageSet();
7676 }
7777
 78+ /**
 79+ * This is a very simplistic utility function
 80+ * to convert a title string to a db key.
 81+ * It will replace all ' ' with '_', and make first letter uppercase
 82+ */
7883 public static function titleToKey($title) {
 84+ global $wgContLang, $wgCapitalLinks;
 85+ if ($wgCapitalLinks)
 86+ $title = $wgContLang->ucfirst( $title );
7987 return str_replace(' ', '_', $title);
8088 }
8189

Follow-up revisions

RevisionCommit summaryAuthorDate
r39936Follow-up for r39935: re-fix bug 14651 by making the first letter uppercase i...catrope05:51, 25 August 2008