$s = Xml::openElement( 'form', array( 'action' => $wgScript,
'id' => 'mw-history-compare' ) ) . "\n";
$s .= Xml::hidden( 'title', $this->title->getPrefixedDbKey() ) . "\n";
+ $s .= Xml::hidden( 'action', 'historysubmit' ) . "\n";
$this->buttons = '<div>';
if( $wgUser->isAllowed('deletedhistory') ) {
$float = $wgContLang->isRTL() ? 'left' : 'right';
+ # Note bug #20966, <button> is non-standard in IE<8
$this->buttons .= Xml::element( 'button',
array(
'type' => 'submit',
- 'name' => 'action',
- 'value' => 'revisiondelete',
+ 'name' => 'revisiondelete',
+ 'value' => '1',
'style' => "float: $float;",
'class' => 'mw-history-revisiondelete-button',
),
$action = 'nosuchaction';
}
+ # Workaround for bug #20966: inability of IE to provide an action dependent
+ # on which submit button is clicked.
+ if ( $action === 'historysubmit' ) {
+ if ( $request->getBool( 'revisiondelete' ) ) {
+ $action = 'revisiondelete';
+ } else {
+ $action = 'view';
+ }
+ }
+
switch( $action ) {
case 'view':
$output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) );
// $this->ids = array_map( 'intval', $this->ids );
$this->ids = array_unique( array_filter( $this->ids ) );
- if ( $wgRequest->getVal( 'action' ) == 'revisiondelete' ) {
+ if ( $wgRequest->getVal( 'action' ) == 'historysubmit' ) {
# For show/hide form submission from history page
$this->targetObj = $GLOBALS['wgTitle'];
$this->typeName = 'revision';