From: Brion Vibber Date: Wed, 28 Dec 2005 22:28:04 +0000 (+0000) Subject: * (bug 4385) Separate parser cache entries for non-editing users, so section X-Git-Tag: 1.6.0~867 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=148b30c81af06ee89d052622e6f6a603de45395e;p=lhc%2Fweb%2Fwiklou.git * (bug 4385) Separate parser cache entries for non-editing users, so section edit links don't vanish / appear unwanted on protected pages --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index bed0f9d078..3e4ae5aa12 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -365,6 +365,8 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 4392) Update of LanguageSr.php * (bug 4382) Frisian numeric format * (bug 4411) Fix messages diff link for classic skin +* (bug 4385) Separate parser cache entries for non-editing users, so section + edit links don't vanish / appear unwanted on protected pages === Caveats === diff --git a/includes/ParserCache.php b/includes/ParserCache.php index b6f5345a4a..53f7212824 100644 --- a/includes/ParserCache.php +++ b/includes/ParserCache.php @@ -23,9 +23,15 @@ class ParserCache { function getKey( &$article, &$user ) { global $wgDBname, $action; $hash = $user->getPageRenderingHash(); + if( !$article->mTitle->userCanEdit() ) { + // section edit links are suppressed even if the user has them on + $edit = '!edit=0'; + } else { + $edit = ''; + } $pageid = intval( $article->getID() ); $renderkey = (int)($action == 'render'); - $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash"; + $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash$edit"; return $key; }