$this->getOutput()->addHTML( $this->showOptions( $NS, $type, $level, $sizetype, $size, $indefOnly, $cascadeOnly ) );
if( $pager->getNumRows() ) {
- $s = $pager->getNavigationBar();
- $s .= "<ul>" .
- $pager->getBody() .
- "</ul>";
- $s .= $pager->getNavigationBar();
+ $this->getOutput()->addHTML(
+ $pager->getNavigationBar() .
+ '<ul>' . $pager->getBody() . '</ul>' .
+ $pager->getNavigationBar()
+ );
} else {
- $s = '<p>' . wfMsgHtml( 'protectedpagesempty' ) . '</p>';
+ $this->getOutput()->addWikiMsg( 'protectedpagesempty' );
}
- $this->getOutput()->addHTML( $s );
}
/**
$description_items = array ();
- $protType = wfMsgHtml( 'restriction-level-' . $row->pr_level );
+ $protType = $this->msg( 'restriction-level-' . $row->pr_level )->escaped();
$description_items[] = $protType;
if( $row->pr_cascade ) {
- $description_items[] = wfMsg( 'protect-summary-cascade' );
+ $description_items[] = $this->msg( 'protect-summary-cascade' )->text();
}
$stxt = '';
$expiry = $lang->formatExpiry( $row->pr_expiry, TS_MW );
if( $expiry != $infinity ) {
-
- $expiry_description = wfMsg(
+ $user = $this->getUser();
+ $description_items[] = $this->msg(
'protect-expiring-local',
- $lang->timeanddate( $expiry, true ),
- $lang->date( $expiry, true ),
- $lang->time( $expiry, true )
- );
-
- $description_items[] = htmlspecialchars($expiry_description);
+ $lang->userTimeAndDate( $expiry, $user ),
+ $lang->userDate( $expiry, $user ),
+ $lang->userTime( $expiry, $user )
+ )->escaped();
}
if(!is_null($size = $row->page_len)) {
if( $this->getUser()->isAllowed( 'protect' ) ) {
$changeProtection = Linker::linkKnown(
$title,
- wfMsgHtml( 'protect_change' ),
+ $this->msg( 'protect_change' )->escaped(),
array(),
array( 'action' => 'unprotect' )
);
$ltitle = SpecialPage::getTitleFor( 'Log' );
$changeProtection = Linker::linkKnown(
$ltitle,
- wfMsgHtml( 'protectlogpage' ),
+ $this->msg( 'protectlogpage' )->escaped(),
array(),
array(
'type' => 'protect',
$title = $this->getTitle();
return Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
Xml::openElement( 'fieldset' ) .
- Xml::element( 'legend', array(), wfMsg( 'protectedpages' ) ) .
+ Xml::element( 'legend', array(), $this->msg( 'protectedpages' )->text() ) .
Html::hidden( 'title', $title->getPrefixedDBkey() ) . "\n" .
$this->getNamespaceMenu( $namespace ) . " \n" .
$this->getTypeMenu( $type ) . " \n" .
"</span><br /><span style='white-space: nowrap'>" .
$this->getSizeLimit( $sizetype, $size ) . " \n" .
"</span>" .
- " " . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . "\n" .
+ " " . Xml::submitButton( $this->msg( 'allpagessubmit' )->text() ) . "\n" .
Xml::closeElement( 'fieldset' ) .
Xml::closeElement( 'form' );
}
*/
protected function getExpiryCheck( $indefOnly ) {
return
- Xml::checkLabel( wfMsg('protectedpages-indef'), 'indefonly', 'indefonly', $indefOnly ) . "\n";
+ Xml::checkLabel( $this->msg( 'protectedpages-indef' )->text(), 'indefonly', 'indefonly', $indefOnly ) . "\n";
}
/**
*/
protected function getCascadeCheck( $cascadeOnly ) {
return
- Xml::checkLabel( wfMsg('protectedpages-cascade'), 'cascadeonly', 'cascadeonly', $cascadeOnly ) . "\n";
+ Xml::checkLabel( $this->msg( 'protectedpages-cascade' )->text(), 'cascadeonly', 'cascadeonly', $cascadeOnly ) . "\n";
}
/**
$max = $sizetype === 'max';
return
- Xml::radioLabel( wfMsg('minimum-size'), 'sizetype', 'min', 'wpmin', !$max ) .
+ Xml::radioLabel( $this->msg( 'minimum-size' )->text(), 'sizetype', 'min', 'wpmin', !$max ) .
' ' .
- Xml::radioLabel( wfMsg('maximum-size'), 'sizetype', 'max', 'wpmax', $max ) .
+ Xml::radioLabel( $this->msg( 'maximum-size' )->text(), 'sizetype', 'max', 'wpmax', $max ) .
' ' .
Xml::input( 'size', 9, $size, array( 'id' => 'wpsize' ) ) .
' ' .
- Xml::label( wfMsg('pagesize'), 'wpsize' );
+ Xml::label( $this->msg( 'pagesize' )->text(), 'wpsize' );
}
/**
// First pass to load the log names
foreach( Title::getFilteredRestrictionTypes( true ) as $type ) {
- $text = wfMsg("restriction-$type");
+ $text = $this->msg( "restriction-$type" )->text();
$m[$text] = $type;
}
}
return "<span style='white-space: nowrap'>" .
- Xml::label( wfMsg('restriction-type') , $this->IdType ) . ' ' .
+ Xml::label( $this->msg( 'restriction-type' )->text(), $this->IdType ) . ' ' .
Xml::tags( 'select',
array( 'id' => $this->IdType, 'name' => $this->IdType ),
implode( "\n", $options ) ) . "</span>";
protected function getLevelMenu( $pr_level ) {
global $wgRestrictionLevels;
- $m = array( wfMsg('restriction-level-all') => 0 ); // Temporary array
+ $m = array( $this->msg( 'restriction-level-all' )->text() => 0 ); // Temporary array
$options = array();
// First pass to load the log names
foreach( $wgRestrictionLevels as $type ) {
// Messages used can be 'restriction-level-sysop' and 'restriction-level-autoconfirmed'
if( $type !='' && $type !='*') {
- $text = wfMsg("restriction-level-$type");
+ $text = $this->msg( "restriction-level-$type" )->text();
$m[$text] = $type;
}
}
}
return "<span style='white-space: nowrap'>" .
- Xml::label( wfMsg( 'restriction-level' ) , $this->IdLevel ) . ' ' .
+ Xml::label( $this->msg( 'restriction-level' )->text(), $this->IdLevel ) . ' ' .
Xml::tags( 'select',
array( 'id' => $this->IdLevel, 'name' => $this->IdLevel ),
implode( "\n", $options ) ) . "</span>";