Merge "Remove two unused OutputPage methods"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 27 Jul 2018 18:33:44 +0000 (18:33 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 27 Jul 2018 18:33:44 +0000 (18:33 +0000)
RELEASE-NOTES-1.32
includes/OutputPage.php

index 0ffbdea..00ee8a3 100644 (file)
@@ -207,6 +207,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
index 4e7c0bb..2e091f1 100644 (file)
@@ -403,18 +403,6 @@ class OutputPage extends ContextSource {
                return $this->mLinktags;
        }
 
-       /**
-        * Add a new \<link\> 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 <link rel=canonical>. 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 \<script\> tag, etc.)
         * Internal use only. Use OutputPage::addModules() or OutputPage::addJsConfigVars()