Index: branches/wmf/1.18wmf1/includes/parser/Parser.php |
— | — | @@ -4017,7 +4017,7 @@ |
4018 | 4018 | ); |
4019 | 4019 | |
4020 | 4020 | # give headline the correct <h#> tag |
4021 | | - if ( $showEditLink && $sectionIndex !== false ) { |
| 4021 | + if ( $sectionIndex !== false ) { |
4022 | 4022 | // Output edit section links as markers with styles that can be customized by skins |
4023 | 4023 | if ( $isTemplate ) { |
4024 | 4024 | # Put a T flag in the section identifier, to indicate to extractSections() |
Index: branches/wmf/1.18wmf1/includes/parser/ParserOutput.php |
— | — | @@ -158,6 +158,8 @@ |
159 | 159 | if ( $this->mEditSectionTokens ) { |
160 | 160 | return preg_replace_callback( ParserOutput::EDITSECTION_REGEX, |
161 | 161 | array( &$this, 'replaceEditSectionLinksCallback' ), $this->mText ); |
| 162 | + } else { |
| 163 | + return preg_replace( ParserOutput::EDITSECTION_REGEX, '', $this->mText ); |
162 | 164 | } |
163 | 165 | return $this->mText; |
164 | 166 | } |
Index: branches/wmf/1.18wmf1/includes/parser/ParserCache.php |
— | — | @@ -174,6 +174,11 @@ |
175 | 175 | } |
176 | 176 | |
177 | 177 | wfDebug( "Found.\n" ); |
| 178 | + |
| 179 | + // The edit section preference may not be the appropiate one in |
| 180 | + // the ParserOutput, as we are not storing it in the parsercache |
| 181 | + // key. Force it here. See bug 31445. |
| 182 | + $value->setEditSectionTokens( $popts->getEditSection() ); |
178 | 183 | |
179 | 184 | if ( !$useOutdated && $value->expired( $touched ) ) { |
180 | 185 | wfIncrStats( "pcache_miss_expired" ); |