* (bug 19761) Removed autogenerated <meta keywords> tag with link data.
authorBrion Vibber <brion@users.mediawiki.org>
Sun, 19 Jul 2009 17:07:03 +0000 (17:07 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sun, 19 Jul 2009 17:07:03 +0000 (17:07 +0000)
  Keyword set was not useful, and is ignored by modern search engines anway.

RELEASE-NOTES
includes/OutputPage.php

index bf625ed..60f6bfa 100644 (file)
@@ -290,6 +290,8 @@ this. Was used when mwEmbed was going to be an extension.
 * (bug 19814) interwiki links from file links ([[File:Foo.jpg|link=de:Test]])
   are no longer recorded in the pagelinks table
 * (bug 19784) date option "ISO 8601" produced illegal id
+* (bug 19761) Removed autogenerated <meta keywords> tag with link data.
+  Keyword set was not useful, and is ignored by modern search engines anway.
 
 == API changes in 1.16 ==
 
index 614b812..8d80657 100644 (file)
@@ -749,7 +749,6 @@ class OutputPage {
                        $this->setIndexPolicy( $parserOutput->getIndexPolicy() );
                }
 
-               $this->addKeywords( $parserOutput );
                $this->mParseWarnings = $parserOutput->getWarnings();
                if ( $parserOutput->getCacheTime() == -1 ) {
                        $this->enableClientCache( false );
@@ -1681,42 +1680,6 @@ class OutputPage {
                $this->addReturnTo( $titleObj, $returntoquery );
        }
 
-       /**
-        * This function takes the title (first item of mGoodLinks), categories,
-        * existing and broken links for the page
-        * and uses the first 10 of them for META keywords
-        *
-        * @param ParserOutput &$parserOutput
-        */
-       private function addKeywords( &$parserOutput ) {
-               global $wgContLang;
-               // Get an array of keywords if there are more than one
-               // variant of the site language
-               $text = $wgContLang->autoConvertToAllVariants( $this->getTitle()->getPrefixedText());
-               // array_values: We needn't to merge variant's code name
-               // into $this->mKeywords;
-               // array_unique: We should insert a keyword just for once
-               if( is_array( $text ))
-                       $text = array_unique( array_values( $text ));
-               $this->addKeyword( $text );
-               $count = 1;
-               $links2d =& $parserOutput->getLinks();
-               if ( !is_array( $links2d ) ) {
-                       return;
-               }
-               foreach ( $links2d as $dbkeys ) {
-                       foreach( $dbkeys as $dbkey => $unused ) {
-                               $dbkey = $wgContLang->autoConvertToAllVariants( $dbkey );
-                               if( is_array( $dbkey ))
-                                       $dbkey = array_unique( array_values( $dbkey ));
-                               $this->addKeyword( $dbkey );
-                               if ( ++$count > 10 ) {
-                                       break 2;
-                               }
-                       }
-               }
-       }
-
        /**
         * @return string The doctype, opening <html>, and head element.
         */