From: Roan Kattouw Date: Mon, 25 Aug 2008 05:51:46 +0000 (+0000) Subject: Follow-up for r39935: re-fix bug 14651 by making the first letter uppercase if needed... X-Git-Tag: 1.31.0-rc.0~45685 X-Git-Url: http://git.cyclocoop.org/%28%28?a=commitdiff_plain;h=27cb2f9ab0106c47df09a745d225d823584edfed;p=lhc%2Fweb%2Fwiklou.git 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. --- diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index b5ceb75e63..af71a56d71 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -324,6 +324,9 @@ abstract class ApiQueryBase extends ApiBase { * @return string Page title with underscores */ public function titleToKey($title) { + global $wgContLang, $wgCapitalLinks; + if($wgCaptialLinks) + $title = $wgContLang->ucfirst($title); return str_replace(' ', '_', $title); }