array(),
array( 'known', 'noclasses' )
) . '</span>'
- : $this->getSkin()->makeSizeLinkObj( $pageLength, $title );
+ : $this->getSkin()->link( $title );
if ( $wgExperimentalCategorySort ) {
$this->articles_start_char[] = $wgContLang->convert( $wgContLang->firstLetterForLists( $sortkey ) );
$colour = 'mw-redirect';
} elseif ( $threshold > 0 &&
$t->exists() && $t->getLength() < $threshold &&
- MWNamespace::isContent( $t->getNamespace() ) ) {
+ $t->isContentPage() ) {
# Page is a stub
$colour = 'stub';
}
$classes[] = 'extiw';
}
- # Note that redirects never count as stubs here.
- if ( !in_array( 'broken', $options ) && $target->isRedirect() ) {
- $classes[] = 'mw-redirect';
- } elseif( $target->isContentPage() ) {
- # Check for stub.
- $threshold = $wgUser->getOption( 'stubthreshold' );
- if( $threshold > 0 and $target->exists() and $target->getLength() < $threshold ) {
- $classes[] = 'stub';
+ if ( !in_array( 'broken', $options ) ) { # Avoid useless calls to LinkCache (see r50387)
+ $colour = $this->getLinkColour( $target, $wgUser->getOption( 'stubthreshold' ) );
+ if ( $colour !== '' ) {
+ $classes[] = $colour; # mw-redirect or stub
}
}
if( $classes != array() ) {
* @param $trail String
* @param $prefix String
* @return string HTML of link
+ * @deprecated
*/
function makeSizeLinkObj( $size, $nt, $text = '', $query = '', $trail = '', $prefix = '' ) {
global $wgUser;
+ wfDeprecated( __METHOD__ );
+
$threshold = intval( $wgUser->getOption( 'stubthreshold' ) );
$colour = ( $size < $threshold ) ? 'stub' : '';
// FIXME: replace deprecated makeColouredLinkObj by link()
* @param $prefix String: Optional prefix
*/
function makeColouredLinkObj( $nt, $colour, $text = '', $query = '', $trail = '', $prefix = '' ) {
+ wfDeprecated( __METHOD__ );
if($colour != ''){
$style = $this->getInternalLinkAttributesObj( $nt, $text, $colour );
} else $style = '';