* Allow parser cache on redirect targets
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 9 Nov 2005 10:58:54 +0000 (10:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 9 Nov 2005 10:58:54 +0000 (10:58 +0000)
RELEASE-NOTES
includes/Article.php

index d80b880..8961b7c 100644 (file)
@@ -217,6 +217,7 @@ fully support the editing toolbar, but was found to be too confusing.
 * Forbid usernames that can be interpreted as titles with namespaces, as that
   leads to hard-to-manage names.
 * (bug 2721) Regression: Use European number separators for vi: wikis
+* Allow parser cache on redirect targets
 
 
 === Caveats ===
index 48d31d0..eb131c6 100644 (file)
@@ -756,8 +756,13 @@ class Article {
                                        $redir = $sk->makeKnownLink( $this->mRedirectedFrom, '', 'redirect=no' );
                                        $s = wfMsg( 'redirectedfrom', $redir );
                                        $wgOut->setSubtitle( $s );
-                                       # Can't cache redirects
-                                       $pcache = false;
+                                       
+                                       // Check the parser cache again, for the target page
+                                       if( $pcache ) {
+                                               if( $wgOut->tryParserCache( $this, $wgUser ) ) {
+                                                       $outputDone = true;
+                                               }
+                                       }
                                        $wasRedirected = true;
                                }
                        } elseif ( !empty( $rdfrom ) ) {
@@ -770,7 +775,8 @@ class Article {
                                        $wasRedirected = true;
                                }
                        }
-
+               }
+               if( !$outputDone ) {
                        # wrap user css and user js in pre and don't parse
                        # XXX: use $this->mTitle->usCssJsSubpage() when php is fixed/ a workaround is found
                        if (