* Fix message page caching behavior when $wgCapitalLinks is turned off
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 18 Dec 2004 08:11:32 +0000 (08:11 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 18 Dec 2004 08:11:32 +0000 (08:11 +0000)
  after installation and the wiki is subsequently upgraded

includes/MessageCache.php

index 714f462..86f95c7 100755 (executable)
@@ -159,7 +159,9 @@ class MessageCache
                if ( !$this->mKeys ) {
                        $this->mKeys = array();
                        foreach ( $wgAllMessagesEn as $key => $value ) {
-                               array_push( $this->mKeys, $wgContLang->ucfirst( $key ) );
+                               global $wgCapitalLinks;
+                               $title = $wgCapitalLinks ? $wgContLang->ucfirst( $key ) : $key;
+                               array_push( $this->mKeys, $title );
                        }
                }
                return $this->mKeys;
@@ -235,7 +237,8 @@ class MessageCache
 
                $message = false;
                if( !$this->mDisable && $useDB ) {
-                       $title = $lang->ucfirst( $key );
+                       global $wgCapitalLinks;
+                       $title = $wgCapitalLinks ? $lang->ucfirst( $key ) : $key;
                        if( $langcode != $wgContLanguageCode ) {
                                $title .= '/' . $langcode;
                        }