| Index: trunk/phase3/includes/HistoryPage.php |
| — | — | @@ -349,15 +349,17 @@ |
| 350 | 350 | $s = Xml::openElement( 'form', array( 'action' => $wgScript, |
| 351 | 351 | 'id' => 'mw-history-compare' ) ) . "\n"; |
| 352 | 352 | $s .= Xml::hidden( 'title', $this->title->getPrefixedDbKey() ) . "\n"; |
| | 353 | + $s .= Xml::hidden( 'action', 'historysubmit' ) . "\n"; |
| 353 | 354 | |
| 354 | 355 | $this->buttons = '<div>'; |
| 355 | 356 | if( $wgUser->isAllowed('deletedhistory') ) { |
| 356 | 357 | $float = $wgContLang->isRTL() ? 'left' : 'right'; |
| | 358 | + # Note bug #20966, <button> is non-standard in IE<8 |
| 357 | 359 | $this->buttons .= Xml::element( 'button', |
| 358 | 360 | array( |
| 359 | 361 | 'type' => 'submit', |
| 360 | | - 'name' => 'action', |
| 361 | | - 'value' => 'revisiondelete', |
| | 362 | + 'name' => 'revisiondelete', |
| | 363 | + 'value' => '1', |
| 362 | 364 | 'style' => "float: $float;", |
| 363 | 365 | 'class' => 'mw-history-revisiondelete-button', |
| 364 | 366 | ), |
| Index: trunk/phase3/includes/Wiki.php |
| — | — | @@ -465,6 +465,16 @@ |
| 466 | 466 | $action = 'nosuchaction'; |
| 467 | 467 | } |
| 468 | 468 | |
| | 469 | + # Workaround for bug #20966: inability of IE to provide an action dependent |
| | 470 | + # on which submit button is clicked. |
| | 471 | + if ( $action === 'historysubmit' ) { |
| | 472 | + if ( $request->getBool( 'revisiondelete' ) ) { |
| | 473 | + $action = 'revisiondelete'; |
| | 474 | + } else { |
| | 475 | + $action = 'view'; |
| | 476 | + } |
| | 477 | + } |
| | 478 | + |
| 469 | 479 | switch( $action ) { |
| 470 | 480 | case 'view': |
| 471 | 481 | $output->setSquidMaxage( $this->getVal( 'SquidMaxage' ) ); |
| Index: trunk/phase3/includes/specials/SpecialRevisiondelete.php |
| — | — | @@ -119,7 +119,7 @@ |
| 120 | 120 | // $this->ids = array_map( 'intval', $this->ids ); |
| 121 | 121 | $this->ids = array_unique( array_filter( $this->ids ) ); |
| 122 | 122 | |
| 123 | | - if ( $wgRequest->getVal( 'action' ) == 'revisiondelete' ) { |
| | 123 | + if ( $wgRequest->getVal( 'action' ) == 'historysubmit' ) { |
| 124 | 124 | # For show/hide form submission from history page |
| 125 | 125 | $this->targetObj = $GLOBALS['wgTitle']; |
| 126 | 126 | $this->typeName = 'revision'; |