From 62eea350d7eec610fe6919da4ce28940dcc8bc77 Mon Sep 17 00:00:00 2001 From: Aryeh Gregor Date: Tue, 24 Jul 2018 16:45:02 +0300 Subject: [PATCH] Remove two unused OutputPage methods addMetadataLink and getMetadataAttribute were added in 2004 (22f8c4ce) for functionality that was moved to extensions in 2011 (27c3b22b). Those extensions, CreateCommonsRdf and DublinCoreRdf, now use addHeadItem() directly. There are no other callers in core or extensions. Change-Id: I4bc21fdaefc8f56969a2950eb53b340bf4aac399 --- RELEASE-NOTES-1.32 | 2 ++ includes/OutputPage.php | 28 ---------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/RELEASE-NOTES-1.32 b/RELEASE-NOTES-1.32 index 486645a867..074707bad9 100644 --- a/RELEASE-NOTES-1.32 +++ b/RELEASE-NOTES-1.32 @@ -195,6 +195,8 @@ because of Phabricator reports. CapsuleMultiselectWidget. The following methods may no longer be used: * setItemsFromData: Use setValue instead * getItemsData: Use getItems instead and get the data property +* Two OutputPage methods, addMetadataLink() and getMetadataAttribute(), were + removed. Use addLink() instead. === Deprecations in 1.32 === * Use of a StartProfiler.php file is deprecated in favour of placing diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 4e7c0bbe83..2e091f1062 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -403,18 +403,6 @@ class OutputPage extends ContextSource { return $this->mLinktags; } - /** - * Add a new \ with "rel" attribute set to "meta" - * - * @param array $linkarr Associative array mapping attribute names to their - * values, both keys and values will be escaped, and the - * "rel" attribute will be automatically added - */ - function addMetadataLink( array $linkarr ) { - $linkarr['rel'] = $this->getMetadataAttribute(); - $this->addLink( $linkarr ); - } - /** * Set the URL to be used for the . This should be used * in preference to addLink(), to avoid duplicate link tags. @@ -435,22 +423,6 @@ class OutputPage extends ContextSource { return $this->mCanonicalUrl; } - /** - * Get the value of the "rel" attribute for metadata links - * - * @return string - */ - public function getMetadataAttribute() { - # note: buggy CC software only reads first "meta" link - static $haveMeta = false; - if ( $haveMeta ) { - return 'alternate meta'; - } else { - $haveMeta = true; - return 'meta'; - } - } - /** * Add raw HTML to the list of scripts (including \ tag, etc.) * Internal use only. Use OutputPage::addModules() or OutputPage::addJsConfigVars() -- 2.20.1