From: Alexander Sigachov Date: Tue, 12 Jul 2005 21:23:28 +0000 (+0000) Subject: Add categories to meta KEYWORDS X-Git-Tag: 1.5.0beta4~153 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/pie.php?a=commitdiff_plain;h=11acc476f42f3b43f43864bb7be0730f54bd8e33;p=lhc%2Fweb%2Fwiklou.git Add categories to meta KEYWORDS --- diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 05e2756bca..36e5871365 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -765,14 +765,15 @@ class OutputPage { } /** - * This function takes the existing and broken links for the page + * 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 */ function addMetaTags () { global $wgLinkCache , $wgOut ; + $categories = array_keys ( $wgLinkCache->mCategoryLinks ) ; $good = array_keys ( $wgLinkCache->mGoodLinks ) ; $bad = array_keys ( $wgLinkCache->mBadLinks ) ; - $a = array_merge ( $good , $bad ) ; + $a = array_merge ( array_slice ( $good , 0 , 1 ), $categories, array_slice ( $good , 1 , 9 ) , $bad ) ; $a = array_slice ( $a , 0 , 10 ) ; # 10 keywords max $a = implode ( ',' , $a ) ; $strip = array(