}
protected function parseParams( $par ) {
- global $wgLang;
$bits = preg_split( '/\s*,\s*/', trim( $par ) );
foreach ( $bits as $bit ) {
if ( 'shownav' == $bit ) {
$this->opts->setValue( 'username', $m[1] );
}
if ( preg_match( '/^namespace=(.*)$/', $bit, $m ) ) {
- $ns = $wgLang->getNsIndex( $m[1] );
+ $ns = $this->getLang()->getNsIndex( $m[1] );
if( $ns !== false ) {
$this->opts->setValue( 'namespace', $ns );
}
}
protected function filterLinks() {
- global $wgGroupPermissions, $wgLang;
+ global $wgGroupPermissions;
// show/hide links
$showhide = array( wfMsgHtml( 'show' ), wfMsgHtml( 'hide' ) );
$links[$key] = wfMsgHtml( $msg, $link );
}
- return $wgLang->pipeList( $links );
+ return $this->getLang()->pipeList( $links );
}
protected function form() {
* @return String
*/
public function formatRow( $result ) {
- global $wgLang;
-
# Revision deletion works on revisions, so we should cast one
$row = array(
'comment' => $result->rc_comment,
$classes = array();
- $dm = $wgLang->getDirMark();
+ $lang = $this->getLang();
+ $dm = $lang->getDirMark();
$title = Title::makeTitleSafe( $result->rc_namespace, $result->rc_title );
$time = Html::element( 'span', array( 'class' => 'mw-newpages-time' ),
- $wgLang->timeAndDate( $result->rc_timestamp, true )
+ $lang->timeanddate( $result->rc_timestamp, true )
);
$query = array( 'redirect' => 'no' );
);
$hist = Html::rawElement( 'span', array( 'class' => 'mw-newpages-history' ), wfMsg( 'parentheses', $histLink ) );
- $length = Html::rawElement( 'span', array( 'class' => 'mw-newpages-length' ),
- '[' . wfMsgExt( 'nbytes', array( 'parsemag', 'escape' ), $wgLang->formatNum( $result->length ) ) .
- ']'
+ $length = Html::element( 'span', array( 'class' => 'mw-newpages-length' ),
+ '[' . $this->msg( 'nbytes' )->numParams( $result->length )->text() . ']'
);
$ulink = Linker::revUserTools( $rev );