# If this is a revision, then we need a target page
$page = Title::newFromUrl( $target );
if( is_null($page) ) {
- $wgOut->addWikiText( wfMsgHtml( 'undelete-header' ) );
+ $wgOut->addWikiMsg( 'undelete-header' );
return;
}
# Only one target set at a time please!
$wgOut->addHtml( "</ul>" );
- $wgOut->addWikiText( wfMsgHtml( 'revdelete-text' ) );
+ $wgOut->addWikiMsg( 'revdelete-text' );
// Normal sysops can always see what they did, but can't always change it
if( !$UserAllowed ) return;
);
if( $this->deleteKey=='oldid' ) {
foreach( $revObjs as $rev )
- $hidden[] = wfHidden( 'oldid[]', $rev->getId() );
+ $hidden[] = Xml::hidden( 'oldid[]', $rev->getId() );
} else {
foreach( $revObjs as $rev )
- $hidden[] = wfHidden( 'artimestamp[]', $rev->getTimestamp() );
+ $hidden[] = Xml::hidden( 'artimestamp[]', $rev->getTimestamp() );
}
$special = SpecialPage::getTitleFor( 'Revisiondelete' );
$wgOut->addHtml(
* This lets a user set restrictions for archived images
*/
function showImages() {
- global $wgOut, $wgUser, $action;
+ // What is $action doing here???
+ global $wgOut, $wgUser, $action, $wgLang;
$UserAllowed = true;
$count = ($this->deleteKey=='oldimage') ? count($this->ofiles) : count($this->afiles);
- $wgOut->addWikiText( wfMsgExt( 'revdelete-selected', array('parsemag'),
- $this->page->getPrefixedText(), $count ) );
+ $wgOut->addWikiMsg( 'revdelete-selected',
+ $this->page->getPrefixedText(),
+ $wgLang->formatNum($count) );
$bitfields = 0;
$wgOut->addHtml( "<ul>" );
$wgOut->addHtml( "</ul>" );
- $wgOut->addWikiText( wfMsgHtml( 'revdelete-text' ) );
+ $wgOut->addWikiMsg('revdelete-text' );
//Normal sysops can always see what they did, but can't always change it
if( !$UserAllowed ) return;
);
if( $this->deleteKey=='oldimage' ) {
foreach( $this->ofiles as $filename )
- $hidden[] = wfHidden( 'oldimage[]', $filename );
+ $hidden[] = Xml::hidden( 'oldimage[]', $filename );
} else {
foreach( $this->afiles as $fileid )
- $hidden[] = wfHidden( 'fileid[]', $fileid );
+ $hidden[] = Xml::hidden( 'fileid[]', $fileid );
}
$special = SpecialPage::getTitleFor( 'Revisiondelete' );
$wgOut->addHtml(
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $special->getLocalUrl( 'action=submit' ),
'id' => 'mw-revdel-form-filerevisions' ) ) .
- Xml::openElement( 'fieldset' ) .
- xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) )
+ Xml::fiedlset( wfMsg( 'revdelete-legend' ) )
);
// FIXME: all items checked for just one file are checked, even if not set for the others
foreach( $this->checks as $item ) {
$wgOut->addHtml( Xml::tags( 'div', null, Xml::checkLabel( wfMsg( $message ), $name, $name, $bitfields & $field ) ) );
}
foreach( $items as $item ) {
- $wgOut->addHtml( Xml::tags( 'p', null, $item ) );
+ $wgOut->addHtml( "<p>$item</p>" );
}
foreach( $hidden as $item ) {
$wgOut->addHtml( $item );
* This lets a user set restrictions for log items
*/
function showLogItems() {
- global $wgOut, $wgUser, $action, $wgMessageCache;
+ global $wgOut, $wgUser, $action, $wgMessageCache, $wgLang;
$UserAllowed = true;
- $wgOut->addWikiText( wfMsgExt( 'logdelete-selected', array('parsemag'), count($this->events) ) );
+ $wgOut->addWikiMsg( 'logdelete-selected', $wgLang->formatNum( count($this->events) ) );
$bitfields = 0;
$wgOut->addHtml( "<ul>" );
$wgOut->addHtml(
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $special->getLocalUrl( 'action=submit' ),
'id' => 'mw-revdel-form-logs' ) ) .
- Xml::openElement( 'fieldset' ) .
- xml::element( 'legend', null, wfMsg( 'revdelete-legend' ) )
+ Xml::fieldset( wfMsg( 'revdelete-legend' ) )
);
// FIXME: all items checked for just on event are checked, even if not set for the others
foreach( $this->checks as $item ) {
$wgOut->addHtml( Xml::tags( 'div', null, Xml::checkLabel( wfMsg( $message ), $name, $name, $bitfields & $field ) ) );
}
foreach( $items as $item ) {
- $wgOut->addHtml( Xml::tags( 'p', null, $item ) );
+ $wgOut->addHtml( "<p>$item</p>" );
}
foreach( $hidden as $item ) {
$wgOut->addHtml( $item );
$pageLink = "<a href=\"{$url}\">{$date}</a>";
}
- $data = wfMsgHtml( 'widthheight',
+ $data = wfMsg( 'widthheight',
$wgContLang->formatNum( $file->getWidth() ),
$wgContLang->formatNum( $file->getHeight() ) ) .
- ' (' . wfMsgHtml( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')';
+ ' (' . wfMsg( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')';
+ $data = htmlspecialchars( $data );
return "<li>$pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>";
}
$del = ' <tt>' . wfMsgHtml( 'deletedrev' ) . '</tt>';
}
- $data = wfMsgHtml( 'widthheight',
+ $data = wfMsg( 'widthheight',
$wgContLang->formatNum( $file->getWidth() ),
$wgContLang->formatNum( $file->getHeight() ) ) .
- ' (' . wfMsgHtml( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')';
+ ' (' . wfMsg( 'nbytes', $wgContLang->formatNum( $file->getSize() ) ) . ')';
+ $data = htmlspecialchars( $data );
return "<li> $pageLink ".$this->fileUserTools( $file )." $data ".$this->fileComment( $file )."$del</li>";
}
private function success() {
global $wgOut;
- $wgOut->setPagetitle( wfMsgHtml( 'actioncomplete' ) );
+ $wgOut->setPagetitle( wfMsg( 'actioncomplete' ) );
+
+ $wrap = '<span class="success">$1</span>';
if( $this->deleteKey=='logid' ) {
- $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'logdelete-success' ) ), false );
+ $wgOut->wrapWikiMsg( $wrap, 'logdelete-success' );
$this->showLogItems();
} else if( $this->deleteKey=='oldid' || $this->deleteKey=='artimestamp' ) {
- $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false );
+ $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' );
$this->showRevs();
} else if( $this->deleteKey=='fileid' ) {
- $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false );
+ $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' );
$this->showImages();
} else if( $this->deleteKey=='oldimage' ) {
- $wgOut->addWikiText( Xml::element( 'span', array( 'class' => 'success' ), wfMsg( 'revdelete-success' ) ), false );
+ $wgOut->wrapWikiMsg( $wrap, 'revdelete-success' );
$this->showImages();
}
}