https://bugzilla.wikimedia.org/show_bug.cgi?id=25513

           Summary: setHTMLTitle does not override the HTML title when not
                    frompagetitle
           Product: MediaWiki
           Version: 1.16.0
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: Normal
         Component: Page rendering
        AssignedTo: wikibugs-l@lists.wikimedia.org
        ReportedBy: d...@israwebix.com


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.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to