From 14e8a303b8b6c6b40e2109d9efc7e41211c9be29 Mon Sep 17 00:00:00 2001 From: Yuri Astrakhan Date: Mon, 16 Oct 2006 02:14:10 +0000 Subject: [PATCH] * API: fixed titleToKey() to convert values to upper case. --- includes/api/ApiQueryBase.php | 8 ++++++++ 1 file changed, 8 insertions(+) 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); } -- 2.20.1