* @param $oppositedm Boolean Add the direction mark opposite to your
* language, to display text properly
* @return String
+ * @deprecated since 1.19; use Language::specialList() instead
*/
function wfSpecialList( $page, $details, $oppositedm = true ) {
global $wgLang;
- $dirmark = ( $oppositedm ? $wgLang->getDirMark( true ) : '' ) .
- $wgLang->getDirMark();
- $details = $details ? $dirmark . " ($details)" : '';
- return $page . $details;
+ return $wgLang->specialList( $page, $details, $oppositedm );
}
/**
array( 'broken' )
);
}
- return wfSpecialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) );
+ return $this->getLang()->specialList( $pageLink, $this->makeWlhLink( $title, $skin, $result ) );
} else {
$tsafe = htmlspecialchars( $result->title );
return wfMsgHtml( 'wantedpages-badtitle', $tsafe );
$ulinks = Linker::userLink( $row->user_id, $userName );
$ulinks .= Linker::userToolLinks( $row->user_id, $userName );
+ $lang = $this->getLang();
+
$list = array();
foreach( self::getGroups( $row->user_id ) as $group ) {
if ( isset( $this->groups[$group] ) ) {
}
$list[] = self::buildGroupLink( $group, $userName );
}
- $groups = $this->getLang()->commaList( $list );
+ $groups = $lang->commaList( $list );
- $item = wfSpecialList( $ulinks, $groups );
+ $item = $lang->specialList( $ulinks, $groups );
$count = wfMsgExt( 'activeusers-count',
array( 'parsemag' ),
- $this->getLang()->formatNum( $row->recentedits ),
+ $lang->formatNum( $row->recentedits ),
$userName,
- $this->getLang()->formatNum( $this->RCMaxAge )
+ $lang->formatNum( $this->RCMaxAge )
);
$blocked = $row->blocked ? ' ' . wfMsgExt( 'listusers-blocked', array( 'parsemag' ), $userName ) : '';
$title,
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
- return wfSpecialList( $link, htmlspecialchars( $d ) );
+ return $this->getLang()->specialList( $link, htmlspecialchars( $d ) );
}
}
function formatRow($result) {
$title = Title::makeTitle( NS_CATEGORY, $result->cat_title );
$titleText = Linker::link( $title, htmlspecialchars( $title->getText() ) );
+ $lang = $this->getLang();
$count = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
- $this->getLang()->formatNum( $result->cat_pages ) );
- return Xml::tags('li', null, wfSpecialList( $titleText, $count ) ) . "\n";
+ $lang->formatNum( $result->cat_pages ) );
+ return Xml::tags('li', null, $lang->specialList( $titleText, $count ) ) . "\n";
}
public function getStartForm( $from ) {
array( 'action' => 'history' )
) . $redirect;
- return wfSpecialList( $plink, $nlink );
+ return $this->getLang()->specialList( $plink, $nlink );
}
}
$userPage = Title::makeTitle( NS_USER, $row->user_name );
$name = Linker::link( $userPage, htmlspecialchars( $userPage->getText() ) );
+ $lang = $this->getLang();
+
$groups_list = self::getGroups( $row->user_id );
if( count( $groups_list ) > 0 ) {
$list = array();
foreach( $groups_list as $group )
$list[] = self::buildGroupLink( $group, $userPage->getText() );
- $groups = $this->getLang()->commaList( $list );
+ $groups = $lang->commaList( $list );
} else {
$groups = '';
}
- $item = wfSpecialList( $name, $groups );
+ $item = $lang->specialList( $name, $groups );
if( $row->ipb_deleted ) {
$item = "<span class=\"deleted\">$item</span>";
}
global $wgEdititis;
if ( $wgEdititis ) {
- $editCount = $this->getLang()->formatNum( $row->edits );
+ $editCount = $lang->formatNum( $row->edits );
$edits = ' [' . wfMsgExt( 'usereditcount', array( 'parsemag', 'escape' ), $editCount ) . ']';
} else {
$edits = '';
$created = '';
# Some rows may be NULL
if( $row->creation ) {
- $d = $this->getLang()->date( wfTimestamp( TS_MW, $row->creation ), true );
- $t = $this->getLang()->time( wfTimestamp( TS_MW, $row->creation ), true );
+ $d = $lang->date( wfTimestamp( TS_MW, $row->creation ), true );
+ $t = $lang->time( wfTimestamp( TS_MW, $row->creation ), true );
$created = ' (' . wfMsg( 'usercreated', $d, $t ) . ')';
$created = htmlspecialchars( $created );
}
$count = $this->msg( 'ncategories' )->numParams( $result->value )->escaped();
$link = Linker::link( $title );
- return wfSpecialList( $link, $count );
+ return $this->getLang()->specialList( $link, $count );
}
}
$link = Linker::link( $title );
$wlh = $this->makeWlhLink( $title,
$this->msg( 'nlinks' )->numParams( $result->value )->escaped() );
- return wfSpecialList( $link, $wlh );
+ return $this->getLang()->specialList( $link, $wlh );
}
}
$plink = Linker::link( $nt, htmlspecialchars( $text ) );
$nlinks = $this->msg( 'nmembers' )->numParams( $result->value )->escaped();
- return wfSpecialList( $plink, $nlinks );
+ return $this->getLang()->specialList( $plink, $nlinks );
}
}
public function formatResult( $skin, $result ) {
$title = Title::makeTitle( $result->namespace, $result->title );
- return wfSpecialList(
+ return $this->getLang()->specialList(
Linker::link( $title ),
$this->makeWlhLink( $title, $result )
);
htmlspecialchars( $wgContLang->convert( $title->getPrefixedText() ) )
);
$nv = $this->msg( 'nviews' )->numParams( $result->value )->escaped();
- return wfSpecialList($link, $nv );
+ return $this->getLang()->specialList( $link, $nv );
}
}
return Html::rawElement(
'li',
array(),
- wfSpecialList( $link . $stxt, $lang->commaList( $description_items ), false ) . $changeProtection ) . "\n";
+ $lang->specialList( $link . $stxt, $lang->commaList( $description_items ), false ) . $changeProtection ) . "\n";
}
/**
wfProfileOut( __METHOD__ );
- return '<li>' . wfSpecialList( $link, implode( $description_items, ', ' ) ) . "</li>\n";
+ return '<li>' . $lang->specialList( $link, implode( $description_items, ', ' ) ) . "</li>\n";
}
/**
*/
function formatResult( $skin, $result ) {
$title = Title::makeTitle( NS_TEMPLATE, $result->title );
- $pageLink = $skin->linkKnown(
+ $pageLink = Linker::linkKnown(
$title,
null,
array(),
array( 'redirect' => 'no' )
);
- $wlhLink = $skin->linkKnown(
+ $wlhLink = Linker::linkKnown(
SpecialPage::getTitleFor( 'Whatlinkshere' ),
wfMsgHtml( 'unusedtemplateswlh' ),
array(),
array( 'target' => $title->getPrefixedText() )
);
- return wfSpecialList( $pageLink, $wlhLink );
+ return $this->getLang()->specialList( $pageLink, $wlhLink );
}
function getPageHeader() {
array( 'action' => 'watch', 'token' => $token )
);
- return wfSpecialList( $plink, $wlink );
+ return $this->getLang()->specialList( $plink, $wlink );
}
}
array( 'broken' )
);
+ $lang = $this->getLang();
$nlinks = wfMsgExt( 'nmembers', array( 'parsemag', 'escape' ),
- $this->getLang()->formatNum( $result->value ) );
- return wfSpecialList( $plink, $nlinks );
+ $lang->formatNum( $result->value ) );
+ return $lang->specialList( $plink, $nlinks );
}
}
return str_replace( '$1', $this->formatNum( $size ), $text );
}
+ /**
+ * Make a list item, used by various special pages
+ *
+ * @param $page String Page link
+ * @param $details String Text between brackets
+ * @param $oppositedm Boolean Add the direction mark opposite to your
+ * language, to display text properly
+ * @return String
+ */
+ function specialList( $page, $details, $oppositedm = true ) {
+ $dirmark = ( $oppositedm ? $this->getDirMark( true ) : '' ) .
+ $this->getDirMark();
+ $details = $details ? $dirmark . " ($details)" : '';
+ return $page . $details;
+ }
+
/**
* Get the conversion rule title, if any.
*