r100756 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r100755‎ | r100756 | r100757 >
Date:22:18, 25 October 2011
Author:platonides
Status:ok (Comments)
Tags:
Comment:
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
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -3883,8 +3883,9 @@
38843884
38853885 # Inhibit editsection links if requested in the page
38863886 if ( isset( $this->mDoubleUnderscores['noeditsection'] ) ) {
3887 - $showEditLink = 0;
 3887+ $maybeShowEditLink = $showEditLink = false;
38883888 } else {
 3889+ $maybeShowEditLink = true; /* Actual presence will depend on ParserOptions option */
38893890 $showEditLink = $this->mOptions->getEditSection();
38903891 }
38913892 if ( $showEditLink ) {
@@ -4139,7 +4140,7 @@
41404141 );
41414142
41424143 # give headline the correct <h#> tag
4143 - if ( $sectionIndex !== false ) {
 4144+ if ( $maybeShowEditLink && $sectionIndex !== false ) {
41444145 // Output edit section links as markers with styles that can be customized by skins
41454146 if ( $isTemplate ) {
41464147 # Put a T flag in the section identifier, to indicate to extractSections()

Follow-up revisions

RevisionCommit summaryAuthorDate
r108622MFT r92703, r94131, r100756, r103074, r107623reedy15:04, 11 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r99250Bug 31445: "Section edit links do not show"...platonides20:50, 7 October 2011

Comments

#Comment by Umherirrender (talk | contribs)   21:14, 10 January 2012

It is possible to merge this revision to 1.18wmf1 to fix bug 33250? Thanks.

#Comment by Catrope (talk | contribs)   21:15, 10 January 2012

Tagged.

Status & tagging log