From: Brion Vibber Date: Wed, 9 Nov 2005 10:58:54 +0000 (+0000) Subject: * Allow parser cache on redirect targets X-Git-Tag: 1.6.0~1203 X-Git-Url: http://git.cyclocoop.org/%22.%24redirect_annul.%22?a=commitdiff_plain;h=df67210bdd9e0b542acb1127598a9b1f2c3a7311;p=lhc%2Fweb%2Fwiklou.git * Allow parser cache on redirect targets --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index d80b880f87..8961b7c8fe 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 === diff --git a/includes/Article.php b/includes/Article.php index 48d31d03e2..eb131c613c 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -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 (