Only use the message cache in action=raw if it is explicitly requested. The previous...
authorTim Starling <tstarling@users.mediawiki.org>
Tue, 29 Aug 2006 07:36:02 +0000 (07:36 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Tue, 29 Aug 2006 07:36:02 +0000 (07:36 +0000)
includes/RawPage.php
includes/Skin.php
includes/SkinTemplate.php

index 3c6cff7..f72c660 100644 (file)
@@ -37,6 +37,7 @@ class RawPage {
                $smaxage = $this->mRequest->getIntOrNull( 'smaxage', $wgSquidMaxage );
                $maxage = $this->mRequest->getInt( 'maxage', $wgSquidMaxage );
                $this->mExpandTemplates = $this->mRequest->getVal( 'templates' ) === 'expand';
+               $this->mUseMessageCache = $this->mRequest->getBool( 'usemsgcache' );
                
                $oldid = $this->mRequest->getInt( 'oldid' );
                switch ( $wgRequest->getText( 'direction' ) ) {
@@ -152,7 +153,7 @@ class RawPage {
                $text = '';
                if( $this->mTitle ) {
                        // If it's a MediaWiki message we can just hit the message cache
-                       if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI && !$this->mOldId ) {
+                       if ( $this->mUseMessageCache && $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
                                $key = $this->mTitle->getDBkey();
                                $text = wfMsgForContentNoTrans( $key );
                                # If the message doesn't exist, return a blank
index 2d75ef5..e82dcb4 100644 (file)
@@ -365,7 +365,7 @@ class Skin extends Linker {
                $s = "@import \"$wgStylePath/$sheet\";\n";
                if($wgContLang->isRTL()) $s .= "@import \"$wgStylePath/common/common_rtl.css\";\n";
 
-               $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
+               $query = "usemsgcache=yes&action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
                $s .= '@import "' . $this->makeNSUrl( 'Common.css', $query, NS_MEDIAWIKI ) . "\";\n" .
                        '@import "'.$this->makeNSUrl( ucfirst( $this->getSkinName() . '.css' ), $query, NS_MEDIAWIKI ) . "\";\n";
 
index 3f0c7b3..f6ee356 100644 (file)
@@ -932,7 +932,7 @@ class SkinTemplate extends Skin {
 
                # If we use the site's dynamic CSS, throw that in, too
                if ( $wgUseSiteCss ) {
-                       $query = "action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
+                       $query = "usemsgcache=yes&action=raw&ctype=text/css&smaxage=$wgSquidMaxage";
                        $sitecss .= '@import "' . $this->makeNSUrl('Common.css', $query, NS_MEDIAWIKI) . '";' . "\n";
                        $sitecss .= '@import "' . $this->makeNSUrl(ucfirst($this->skinname) . '.css', $query, NS_MEDIAWIKI) . '";' . "\n";
                        $sitecss .= '@import "' . $this->makeUrl('-','action=raw&gen=css' . $siteargs) . '";' . "\n";