r39936 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r39935‎ | r39936 | r39937 >
Date:05:51, 25 August 2008
Author:catrope
Status:old
Tags:
Comment:
Follow-up for r39935: re-fix bug 14651 by making the first letter uppercase if needed in keyToTitle(). Code stolen from Yuri in r17039, who removed the functionality without explanation in r17096. So much for today's history lesson.
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryBase.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryBase.php
@@ -324,6 +324,9 @@
325325 * @return string Page title with underscores
326326 */
327327 public function titleToKey($title) {
 328+ global $wgContLang, $wgCapitalLinks;
 329+ if($wgCaptialLinks)
 330+ $title = $wgContLang->ucfirst($title);
328331 return str_replace(' ', '_', $title);
329332 }
330333

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r17039* API: fixed titleToKey() to convert values to upper case.yurik02:14, 16 October 2006
r17096API *...yurik23:49, 18 October 2006
r36678Use the proper Title methods in ApiQueryBase::titleToKey() and keyToTitle(). ...catrope15:48, 26 June 2008
r39935API: Go back to using the good old str_replace() hacks rather than Title meth...catrope05:41, 25 August 2008

Status & tagging log