key parser cache on ($action==render)
authorRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 3 Jul 2005 07:27:43 +0000 (07:27 +0000)
committerRiver Tarnell <kateturner@users.mediawiki.org>
Sun, 3 Jul 2005 07:27:43 +0000 (07:27 +0000)
includes/ParserCache.php
includes/Title.php

index 8b3cf9a..b6f5345 100644 (file)
@@ -21,10 +21,11 @@ class ParserCache {
        }
 
        function getKey( &$article, &$user ) {
-               global $wgDBname;
+               global $wgDBname, $action;
                $hash = $user->getPageRenderingHash();
                $pageid = intval( $article->getID() );
-               $key = "$wgDBname:pcache:idhash:$pageid-$hash";
+               $renderkey = (int)($action == 'render');
+               $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash";
                return $key;
        }
 
index 0761f91..91dd6c2 100644 (file)
@@ -729,9 +729,9 @@ class Title {
         * @access public
         */
        function getLocalURL( $query = '' ) {
-               global $wgLang, $wgArticlePath, $wgScript, $wgMakeDumpLinks;
+               global $wgLang, $wgArticlePath, $wgScript, $wgMakeDumpLinks, $action;
 
-               if ( $this->isExternal() ) {
+               if ( $this->isExternal() || $action == 'render' ) {
                        return $this->getFullURL();
                }