From b7d18e82a5bf9a1eede996c045fab0a1fa372055 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Wed, 17 Sep 2008 18:36:49 +0000 Subject: [PATCH] Fix for r40937 (and per talk with brion): merge the RenderHash extension in core --- includes/DefaultSettings.php | 6 ++++++ includes/User.php | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index ea0708ad99..7e704ce504 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -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 diff --git a/includes/User.php b/includes/User.php index 563274daaa..283fbb2ea2 100644 --- a/includes/User.php +++ b/includes/User.php @@ -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 ) ); -- 2.20.1