Last modified: 2012-04-12 13:53:58 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T27513, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 25513 - setHTMLTitle does not override the HTML title when not frompagetitle
setHTMLTitle does not override the HTML title when not frompagetitle
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Parser (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-10-13 17:01 UTC by Gil
Modified: 2012-04-12 13:53 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Gil 2010-10-13 17:01:47 UTC
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.
Comment 1 Niklas Laxström 2010-10-13 17:24:15 UTC
This part of code seems to be changed from 1.16. Can you test with trunk?
Comment 2 Gil 2010-10-13 17:45:18 UTC
Cannot test right now, but the trunk is straightforward on this, so it should be OK.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links