* API: fixed titleToKey() to convert values to upper case.
authorYuri Astrakhan <yurik@users.mediawiki.org>
Mon, 16 Oct 2006 02:14:10 +0000 (02:14 +0000)
committerYuri Astrakhan <yurik@users.mediawiki.org>
Mon, 16 Oct 2006 02:14:10 +0000 (02:14 +0000)
includes/api/ApiQueryBase.php

index 0f8a17f..09fd391 100644 (file)
@@ -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);
        }