From f1d2386af2c9a08b04da64f4a503157b506899c6 Mon Sep 17 00:00:00 2001 From: Daniel Friesen Date: Sat, 8 Jun 2013 06:30:54 -0700 Subject: [PATCH] Kill in a blazing fire. meta-keywords is completely and totally useless. It has absolutely no effect on search engine and no-one uses it anymore. Time to euthanize it. There isn't a single user of OutputPage::addKeywords inside any extension inside of Gerrit. So I'm just deleting this method without a deprecation. Change-Id: I188755521dcde3a9e191975d1ae3cabf7a5d67cd --- RELEASE-NOTES-1.22 | 2 ++ includes/OutputPage.php | 31 ------------------------------- 2 files changed, 2 insertions(+), 31 deletions(-) diff --git a/RELEASE-NOTES-1.22 b/RELEASE-NOTES-1.22 index e32d484db4..1bdc9d9960 100644 --- a/RELEASE-NOTES-1.22 +++ b/RELEASE-NOTES-1.22 @@ -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 " var $mMetatags = array(); - /// "" 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 \ 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'; -- 2.20.1