From 8d0c01d75122dc9228095a9954ef6525115dd6fb Mon Sep 17 00:00:00 2001 From: Platonides Date: Tue, 25 Oct 2011 22:18:33 +0000 Subject: [PATCH] If the page contains __NOEDITSECTION__, it will never have edit sections, so don't create markers. Follow-up r99250. Fix for bug 31647: Regression: __NOEDITSECTION__ is ignored when the page is read from the parser cache --- includes/parser/Parser.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index 4b7093cd46..e8595636ca 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -3883,8 +3883,9 @@ class Parser { # Inhibit editsection links if requested in the page if ( isset( $this->mDoubleUnderscores['noeditsection'] ) ) { - $showEditLink = 0; + $maybeShowEditLink = $showEditLink = false; } else { + $maybeShowEditLink = true; /* Actual presence will depend on ParserOptions option */ $showEditLink = $this->mOptions->getEditSection(); } if ( $showEditLink ) { @@ -4139,7 +4140,7 @@ class Parser { ); # give headline the correct tag - if ( $sectionIndex !== false ) { + if ( $maybeShowEditLink && $sectionIndex !== false ) { // Output edit section links as markers with styles that can be customized by skins if ( $isTemplate ) { # Put a T flag in the section identifier, to indicate to extractSections() -- 2.20.1