Always generate the mw:editsection placeholders.
Remove them if not used.
Update the ParserOutput if fetching from ParserCache
);
# give headline the correct <h#> tag
- if ( $showEditLink && $sectionIndex !== false ) {
+ if ( $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()
}
wfDebug( "Found.\n" );
+
+ // The edit section preference may not be the appropiate one in
+ // the ParserOutput, as we are not storing it in the parsercache
+ // key. Force it here. See bug 31445.
+ $value->setEditSectionTokens( $popts->getEditSection() );
if ( !$useOutdated && $value->expired( $touched ) ) {
wfIncrStats( "pcache_miss_expired" );