bug fix -- parser cache used when it shouldn't be
authorTim Starling <tstarling@users.mediawiki.org>
Fri, 27 Feb 2004 02:24:14 +0000 (02:24 +0000)
committerTim Starling <tstarling@users.mediawiki.org>
Fri, 27 Feb 2004 02:24:14 +0000 (02:24 +0000)
includes/Article.php

index bdba4a7..55f218a 100644 (file)
@@ -305,7 +305,8 @@ class Article {
        {
                global $wgUser, $wgOut, $wgLang;
                global $oldid, $diff; # From query
-               global $wgLinkCache, $IP;
+               global $wgLinkCache, $IP, $wgEnableParserCache;
+               
                $fname = "Article::view";
                wfProfileIn( $fname );
 
@@ -354,7 +355,12 @@ class Article {
                }
 
                $wgLinkCache->preFill( $this->mTitle );
-               $wgOut->addWikiText( $text, true, $this );
+               
+               if( $wgEnableParserCache && intval($wgUser->getOption( "stubthreshold" )) == 0 ){
+                       $wgOut->addWikiText( $text, true, $this );
+               } else {
+                       $wgOut->addWikiText( $text );
+               }
 
                $this->viewUpdates();
                wfProfileOut( $fname );