They were accidentally made non-functional in April 2009 by commit
e4d21170. Subsequent commits
2d045fa1,
9e230f30,
e275ea28,
ae45908c
removed all callers by October 2011. Needless to say, I found no
callers in core or extensions.
It seems we have the functionality in some other way, probably just by
directly calling setHTMLTitle(), so there's no need to revive this
feature.
Bug: T200643
Change-Id: Ifa2537b97cf19e7e91ee33d4ea4c131f7a38ee89
* getItemsData: Use getItems instead and get the data property
* Two OutputPage methods, addMetadataLink() and getMetadataAttribute(), were
removed. Use addLink() instead.
+* Another two OutputPage methods, setPageTitleActionText() and
+ getPageTitleActionText(), were removed. They did nothing since 1.15 (almost
+ ten years). Use setHTMLTitle() directly.
* All MagicWord static member variables have been removed. Use appropriate
hooks or MagicWordFactory methods instead.
* MagicWord::clearCache() has been removed. Instead, create a new
*/
public $mNoGallery = false;
- /** @var string */
- private $mPageTitleActionText = '';
-
/** @var int Cache stuff. Looks like mEnableClientCache */
protected $mCdnMaxage = 0;
/** @var int Upper limit on mCdnMaxage */
}
}
- /**
- * Set the new value of the "action text", this will be added to the
- * "HTML title", separated from it with " - ".
- *
- * @param string $text New value of the "action text"
- */
- public function setPageTitleActionText( $text ) {
- $this->mPageTitleActionText = $text;
- }
-
- /**
- * Get the value of the "action text"
- *
- * @return string
- */
- public function getPageTitleActionText() {
- return $this->mPageTitleActionText;
- }
-
/**
* "HTML title" means the contents of "<title>".
* It is stored as plain, unescaped text and will be run through htmlspecialchars in the skin file.
$this->assertContains( '<meta name="robots" content="noindex,nofollow"/>', $links );
}
- // @todo mPageTitleActionText has done nothing and has no callers for a long time:
- //
- // * e4d21170 inadvertently made it do nothing (Apr 2009)
- // * 10ecfcb0/cadc951d removed the dead code that would have at least indicated what it was
- // supposed to do (Nov 2010)
- // * 9e230f30/2d045fa1 removed from history pages because it did nothing (Oct/Aug 2011)
- // * e275ea28 removed from articles (Oct 2011)
- // * ae45908c removed from EditPage (Oct 2011)
- //
- // Nice if we had had tests so these things couldn't happen by mistake, right?!
- //
- // https://phabricator.wikimedia.org/T200643
-
private function extractHTMLTitle( OutputPage $op ) {
$html = $op->headElement( $op->getContext()->getSkin() );