From: Brian Wolff Date: Wed, 19 Jan 2011 21:51:17 +0000 (+0000) Subject: Follow up r80432. Don't use 'known', 'noclasses' when making the links on category... X-Git-Tag: 1.31.0-rc.0~32468 X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=2f1e3ef330bc797d00215dd0e68e034bb7805bdc Follow up r80432. Don't use 'known', 'noclasses' when making the links on category pages. This appears to date back all the way to r23952, originally as a way to make sure redirects were not marked as 'stub'. Thats now a non-issue since redirects don't get marked as stubs. Also make marking of redirects consistent between the pages section and the subcategory section. --- diff --git a/includes/CategoryPage.php b/includes/CategoryPage.php index 3011a884dd..86c2717adf 100644 --- a/includes/CategoryPage.php +++ b/includes/CategoryPage.php @@ -177,13 +177,15 @@ class CategoryViewer { function addSubcategoryObject( Category $cat, $sortkey, $pageLength ) { // Subcategory; strip the 'Category' namespace from the link text. $title = $cat->getTitle(); - $this->children[] = $this->getSkin()->link( - $title, - $title->getText(), - array(), - array(), - array( 'known', 'noclasses' ) - ); + + $link = $this->getSkin()->link( $title, $title->getText() ); + if ( $title->isRedirect() ) { + // This didn't used to add redirect-in-category, but might + // as well be consistent with the rest of the sections + // on a category page. + $link = '' . $link . ''; + } + $this->children[] = $link; $this->children_start_char[] = $this->getSubcategorySortChar( $cat->getTitle(), $sortkey ); @@ -231,16 +233,13 @@ class CategoryViewer { $this->gallery->add( $title ); } } else { - $this->imgsNoGallery[] = $isRedirect - ? '' . - $this->getSkin()->link( - $title, - null, - array(), - array(), - array( 'known', 'noclasses' ) - ) . '' - : $this->getSkin()->link( $title ); + $link = $this->getSkin()->link( $title ); + if ( $isRedirect ) { + // This seems kind of pointless given 'mw-redirect' class, + // but keeping for back-compatibility with user css. + $link = '' . $link . ''; + } + $this->imgsNoGallery[] = $link; $this->imgsNoGallery_start_char[] = $wgContLang->convert( $this->collation->getFirstLetter( $sortkey ) ); @@ -252,16 +251,14 @@ class CategoryViewer { */ function addPage( $title, $sortkey, $pageLength, $isRedirect = false ) { global $wgContLang; - $this->articles[] = $isRedirect - ? '' . - $this->getSkin()->link( - $title, - null, - array(), - array(), - array( 'known', 'noclasses' ) - ) . '' - : $this->getSkin()->link( $title ); + + $link = $this->getSkin()->link( $title ); + if ( $isRedirect ) { + // This seems kind of pointless given 'mw-redirect' class, + // but keeping for back-compatiability with user css. + $link = '' . $link . ''; + } + $this->articles[] = $link; $this->articles_start_char[] = $wgContLang->convert( $this->collation->getFirstLetter( $sortkey ) );