From: Platonides Date: Tue, 25 Oct 2011 22:18:33 +0000 (+0000) Subject: If the page contains __NOEDITSECTION__, it will never have edit sections, so don... X-Git-Tag: 1.31.0-rc.0~26915 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=8d0c01d75122dc9228095a9954ef6525115dd6fb;p=lhc%2Fweb%2Fwiklou.git 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 --- 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()