$links = array();
$links[] = Linker::linkKnown(
SpecialPage::getTitleFor( 'Log' ),
- wfMsgHtml( 'viewpagelogs' ),
+ $this->msg( 'viewpagelogs' )->escaped(),
array(),
array( 'page' => $this->targetObj->getPrefixedText() )
);
# Give a link to the page history
$links[] = Linker::linkKnown(
$this->targetObj,
- wfMsgHtml( 'pagehist' ),
+ $this->msg( 'pagehist' )->escaped(),
array(),
array( 'action' => 'history' )
);
$undelete = SpecialPage::getTitleFor( 'Undelete' );
$links[] = Linker::linkKnown(
$undelete,
- wfMsgHtml( 'deletedhist' ),
+ $this->msg( 'deletedhist' )->escaped(),
array(),
array( 'target' => $this->targetObj->getPrefixedDBkey() )
);
$this->getOutput()->addWikiMsg( 'revdelete-no-file' );
return;
}
- if( !$oimage->userCan( File::DELETED_FILE, $this->getUser() ) ) {
+ $user = $this->getUser();
+ if( !$oimage->userCan( File::DELETED_FILE, $user ) ) {
if( $oimage->isDeleted( File::DELETED_RESTRICTED ) ) {
$this->getOutput()->permissionRequired( 'suppressrevision' );
} else {
}
return;
}
- if ( !$this->getUser()->matchEditToken( $this->token, $archiveName ) ) {
+ if ( !$user->matchEditToken( $this->token, $archiveName ) ) {
+ $lang = $this->getLanguage();
$this->getOutput()->addWikiMsg( 'revdelete-show-file-confirm',
$this->targetObj->getText(),
- $this->getLanguage()->date( $oimage->getTimestamp() ),
- $this->getLanguage()->time( $oimage->getTimestamp() ) );
+ $lang->userDate( $oimage->getTimestamp(), $user ),
+ $lang->userTime( $oimage->getTimestamp(), $user ) );
$this->getOutput()->addHTML(
Xml::openElement( 'form', array(
'method' => 'POST',
'action' => $this->getTitle()->getLocalUrl(
'target=' . urlencode( $oimage->getName() ) .
'&file=' . urlencode( $archiveName ) .
- '&token=' . urlencode( $this->getUser()->getEditToken( $archiveName ) ) )
+ '&token=' . urlencode( $user->getEditToken( $archiveName ) ) )
)
) .
- Xml::submitButton( wfMsg( 'revdelete-show-file-submit' ) ) .
+ Xml::submitButton( $this->msg( 'revdelete-show-file-submit' )->text() ) .
'</form>'
);
return;
$out = Xml::openElement( 'form', array( 'method' => 'post',
'action' => $this->getTitle()->getLocalUrl( array( 'action' => 'submit' ) ),
'id' => 'mw-revdel-form-revisions' ) ) .
- Xml::fieldset( wfMsg( 'revdelete-legend' ) ) .
+ Xml::fieldset( $this->msg( 'revdelete-legend' )->text() ) .
$this->buildCheckBoxes() .
Xml::openElement( 'table' ) .
"<tr>\n" .
'<td class="mw-label">' .
- Xml::label( wfMsg( 'revdelete-log' ), 'wpRevDeleteReasonList' ) .
+ Xml::label( $this->msg( 'revdelete-log' )->text(), 'wpRevDeleteReasonList' ) .
'</td>' .
'<td class="mw-input">' .
Xml::listDropDown( 'wpRevDeleteReasonList',
- wfMsgForContent( 'revdelete-reason-dropdown' ),
- wfMsgForContent( 'revdelete-reasonotherlist' ), '', 'wpReasonDropDown', 1
+ $this->msg( 'revdelete-reason-dropdown' )->inContentLanguage()->text(),
+ $this->msg( 'revdelete-reasonotherlist' )->inContentLanguage()->text(),
+ '', 'wpReasonDropDown', 1
) .
'</td>' .
"</tr><tr>\n" .
'<td class="mw-label">' .
- Xml::label( wfMsg( 'revdelete-otherreason' ), 'wpReason' ) .
+ Xml::label( $this->msg( 'revdelete-otherreason' )->text(), 'wpReason' ) .
'</td>' .
'<td class="mw-input">' .
Xml::input( 'wpReason', 60, $this->otherReason, array( 'id' => 'wpReason', 'maxlength' => 100 ) ) .
"</tr><tr>\n" .
'<td></td>' .
'<td class="mw-submit">' .
- Xml::submitButton( wfMsgExt('revdelete-submit','parsemag',$numRevisions),
+ Xml::submitButton( $this->msg( 'revdelete-submit', $numRevisions )->text(),
array( 'name' => 'wpSubmit' ) ) .
'</td>' .
"</tr>\n" .
$title = Title::makeTitle( NS_MEDIAWIKI, 'revdelete-reason-dropdown' );
$link = Linker::link(
$title,
- wfMsgHtml( 'revdelete-edit-reasonlist' ),
+ $this->msg( 'revdelete-edit-reasonlist' )->escaped(),
array(),
array( 'action' => 'edit' )
);
}
foreach( $this->checks as $item ) {
list( $message, $name, $field ) = $item;
- $innerHTML = Xml::checkLabel( wfMsg($message), $name, $name, $bitfield & $field );
+ $innerHTML = Xml::checkLabel( $this->msg( $message )->text(), $name, $name, $bitfield & $field );
if( $field == Revision::DELETED_RESTRICTED )
$innerHTML = "<b>$innerHTML</b>";
$line = Xml::tags( 'td', array( 'class' => 'mw-input' ), $innerHTML );
// Otherwise, use tri-state radios
} else {
$html .= '<tr>';
- $html .= '<th class="mw-revdel-checkbox">'.wfMsgHtml('revdelete-radio-same').'</th>';
- $html .= '<th class="mw-revdel-checkbox">'.wfMsgHtml('revdelete-radio-unset').'</th>';
- $html .= '<th class="mw-revdel-checkbox">'.wfMsgHtml('revdelete-radio-set').'</th>';
+ $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-same' )->escaped() . '</th>';
+ $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-unset' )->escaped() . '</th>';
+ $html .= '<th class="mw-revdel-checkbox">' . $this->msg( 'revdelete-radio-set' )->escaped() . '</th>';
$html .= "<th></th></tr>\n";
foreach( $this->checks as $item ) {
list( $message, $name, $field ) = $item;
$line = '<td class="mw-revdel-checkbox">' . Xml::radio( $name, -1, $selected == -1 ) . '</td>';
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 0, $selected == 0 ) . '</td>';
$line .= '<td class="mw-revdel-checkbox">' . Xml::radio( $name, 1, $selected == 1 ) . '</td>';
- $label = wfMsgHtml($message);
+ $label = $this->msg( $message )->escaped();
if( $field == Revision::DELETED_RESTRICTED ) {
$label = "<b>$label</b>";
}
$comment = $listReason;
if( $comment != 'other' && $this->otherReason != '' ) {
// Entry from drop down menu + additional comment
- $comment .= wfMsgForContent( 'colon-separator' ) . $this->otherReason;
+ $comment .= $this->msg( 'colon-separator' )->inContentLanguage()->text() . $this->otherReason;
} elseif( $comment == 'other' ) {
$comment = $this->otherReason;
}