Merge "Kill <meta name="keywords" content="..."> in a blazing fire."
authorBrion VIBBER <brion@wikimedia.org>
Mon, 10 Jun 2013 15:53:15 +0000 (15:53 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Mon, 10 Jun 2013 15:53:15 +0000 (15:53 +0000)
RELEASE-NOTES-1.22
includes/OutputPage.php

index e32d484..1bdc9d9 100644 (file)
@@ -209,6 +209,8 @@ changes to languages because of Bugzilla reports.
 * (bug 40785) mediawiki.legacy.ajax has been marked as deprecated. The following
   properties now emit mw.log.warn when accessed: sajax_debug, sajax_init_object,
   sajax_do_call and wfSupportsAjax.
+* BREAKING CHANGE: meta keywords are no longer supported. A <meta name="keywords"
+  will no longer be output and OutputPage::addKeyword no longer exists.
 
 == Compatibility ==
 
index 09452d6..3657ac3 100644 (file)
@@ -39,9 +39,6 @@ class OutputPage extends ContextSource {
        /// Should be private. Used with addMeta() which adds "<meta>"
        var $mMetatags = array();
 
-       /// "<meta keywords='stuff'>" most of the time the first 10 links to an article
-       var $mKeywords = array();
-
        var $mLinktags = array();
        var $mCanonicalUrl = false;
 
@@ -313,19 +310,6 @@ class OutputPage extends ContextSource {
                array_push( $this->mMetatags, array( $name, $val ) );
        }
 
-       /**
-        * Add a keyword or a list of keywords in the page header
-        *
-        * @param string $text or array of strings
-        */
-       function addKeyword( $text ) {
-               if ( is_array( $text ) ) {
-                       $this->mKeywords = array_merge( $this->mKeywords, $text );
-               } else {
-                       array_push( $this->mKeywords, $text );
-               }
-       }
-
        /**
         * Add a new \<link\> tag to the page header.
         *
@@ -3140,21 +3124,6 @@ $templates
                        ) );
                }
 
-               if ( count( $this->mKeywords ) > 0 ) {
-                       $strip = array(
-                               "/<.*?" . ">/" => '',
-                               "/_/" => ' '
-                       );
-                       $tags['meta-keywords'] = Html::element( 'meta', array(
-                               'name' => 'keywords',
-                               'content' => preg_replace(
-                                       array_keys( $strip ),
-                                       array_values( $strip ),
-                                       implode( ',', $this->mKeywords )
-                               )
-                       ) );
-               }
-
                foreach ( $this->mMetatags as $tag ) {
                        if ( 0 == strcasecmp( 'http:', substr( $tag[0], 0, 5 ) ) ) {
                                $a = 'http-equiv';