From: Yuri Astrakhan Date: Mon, 16 Oct 2006 02:14:10 +0000 (+0000) Subject: * API: fixed titleToKey() to convert values to upper case. X-Git-Tag: 1.31.0-rc.0~55474 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/exercices/supprimer.php?a=commitdiff_plain;h=14e8a303b8b6c6b40e2109d9efc7e41211c9be29;p=lhc%2Fweb%2Fwiklou.git * API: fixed titleToKey() to convert values to upper case. --- diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index 0f8a17fba2..09fd39182a 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -74,7 +74,15 @@ abstract class ApiQueryBase extends ApiBase { return $this->mQueryModule->getPageSet(); } + /** + * This is a very simplistic utility function + * to convert a title string to a db key. + * It will replace all ' ' with '_', and make first letter uppercase + */ public static function titleToKey($title) { + global $wgContLang, $wgCapitalLinks; + if ($wgCapitalLinks) + $title = $wgContLang->ucfirst( $title ); return str_replace(' ', '_', $title); }