edit links don't vanish / appear unwanted on protected pages
* (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 ===
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;
}