Fix for r40937 (and per talk with brion): merge the RenderHash extension in core
authorAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 17 Sep 2008 18:36:49 +0000 (18:36 +0000)
committerAlexandre Emsenhuber <ialex@users.mediawiki.org>
Wed, 17 Sep 2008 18:36:49 +0000 (18:36 +0000)
includes/DefaultSettings.php
includes/User.php

index ea0708a..7e704ce 100644 (file)
@@ -1036,6 +1036,12 @@ $wgUseCategoryBrowser   = false;
  */
 $wgEnableParserCache = true;
 
+/**
+ * Append a configured value to the parser cache and the sitenotice key so
+ * that they can be kept separate for some class of activity.
+ */
+$wgRenderHashAppend = '';
+
 /**
  * If on, the sidebar navigation links are cached for users with the
  * current language set. This can save a touch of load on a busy site
index 563274d..283fbb2 100644 (file)
@@ -2442,7 +2442,7 @@ class User {
         * @return \type{\string} Page rendering hash
         */
        function getPageRenderingHash() {
-               global $wgContLang, $wgUseDynamicDates, $wgLang;
+               global $wgUseDynamicDates, $wgRenderHashAppend, $wgLang, $wgContLang;
                if( $this->mHash ){
                        return $this->mHash;
                }
@@ -2462,6 +2462,8 @@ class User {
                $extra = $wgContLang->getExtraHashOptions();
                $confstr .= $extra;
 
+               $confstr .= $wgRenderHashAppend;
+
                // Give a chance for extensions to modify the hash, if they have
                // extra options or other effects on the parser cache.
                wfRunHooks( 'PageRenderingHash', array( &$confstr ) );