Index: trunk/phase3/includes/ParserCache.php |
— | — | @@ -23,9 +23,15 @@ |
24 | 24 | function getKey( &$article, &$user ) { |
25 | 25 | global $wgDBname, $action; |
26 | 26 | $hash = $user->getPageRenderingHash(); |
| 27 | + if( !$article->mTitle->userCanEdit() ) { |
| 28 | + // section edit links are suppressed even if the user has them on |
| 29 | + $edit = '!edit=0'; |
| 30 | + } else { |
| 31 | + $edit = ''; |
| 32 | + } |
27 | 33 | $pageid = intval( $article->getID() ); |
28 | 34 | $renderkey = (int)($action == 'render'); |
29 | | - $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash"; |
| 35 | + $key = "$wgDBname:pcache:idhash:$pageid-$renderkey!$hash$edit"; |
30 | 36 | return $key; |
31 | 37 | } |
32 | 38 | |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -365,6 +365,8 @@ |
366 | 366 | * (bug 4392) Update of LanguageSr.php |
367 | 367 | * (bug 4382) Frisian numeric format |
368 | 368 | * (bug 4411) Fix messages diff link for classic skin |
| 369 | +* (bug 4385) Separate parser cache entries for non-editing users, so section |
| 370 | + edit links don't vanish / appear unwanted on protected pages |
369 | 371 | |
370 | 372 | |
371 | 373 | === Caveats === |