Index: CategoryPage.php =================================================================== --- CategoryPage.php (revision 14100) +++ CategoryPage.php (working copy) @@ -83,7 +83,7 @@ $limit = $wgCategoryPagingLimit; $res = $dbr->select( array( 'page', 'categorylinks' ), - array( 'page_title', 'page_namespace', 'page_len', 'cl_sortkey' ), + array( 'page_title', 'page_namespace', 'page_is_redirect', 'page_len', 'cl_sortkey' ), array( $pageCondition, 'cl_from = page_id', 'cl_to' => $this->mTitle->getDBKey()), @@ -131,7 +131,7 @@ } } else { // Page in this category - array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ; + array_push( $articles, $sk->makeSizeLinkObj( $x->page_len, $x->page_is_redirect, $title, $wgContLang->convert( $title->getPrefixedText() ) ) ) ; array_push( $articles_start_char, $wgContLang->convert( $wgContLang->firstChar( $x->cl_sortkey ) ) ); } } Index: Linker.php =================================================================== --- Linker.php (revision 14100) +++ Linker.php (working copy) @@ -399,6 +399,7 @@ * on the given page size. * * @param $size Integer + * @param $isredirect Bool * @param $nt Title object. * @param $text String * @param $query String @@ -406,10 +407,10 @@ * @param $prefix String * @return string HTML of link */ - function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { + function makeSizeLinkObj( $size, $isredirect, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) { global $wgUser; $threshold = intval( $wgUser->getOption( 'stubthreshold' ) ); - if( $size < $threshold ) { + if( $size < $threshold && $nt->getNamespace() == NS_MAIN && !$isredirect ) { return $this->makeStubLinkObj( $nt, $text, $query, $trail, $prefix ); } else { return $this->makeKnownLinkObj( $nt, $text, $query, $trail, $prefix );