Page MenuHomePhabricator

setHTMLTitle does not override the HTML title when not frompagetitle
Closed, ResolvedPublic

Description

Author: dev

Description:
setHTMLTitle is not respected when called from an extension.

The code spec (comment) says: "If $name is from page title, it can only override names which are also from page title, but if it is not from page title, it can override all other names."

In the latter case it does not.

The body of the function should be:

if ( $frompagetitle && $this->mHTMLtitleFromPagetitle ) {
$this->mHTMLtitle = $name;
}
elseif ( $this->mHTMLtitleFromPagetitle ) {
$this->mHTMLtitle = $name;
$this->mHTMLtitleFromPagetitle = false;
}
else {
$this->mHTMLtitle = $name;
}

The last 3 lines are the fix.


Version: 1.16.x
Severity: normal

Details

Reference
bz25513

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:18 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz25513.
bzimport added a subscriber: Unknown Object (MLST).

This part of code seems to be changed from 1.16. Can you test with trunk?

dev wrote:

Cannot test right now, but the trunk is straightforward on this, so it should be OK.