r108370 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108369‎ | r108370 | r108371 >
Date:22:15, 8 January 2012
Author:krinkle
Status:ok
Tags:
Comment:
[HistoryAction] Revert r108341 as this breaks revision delete.

This construction never looked cool, but looks like this fix is not the right way, so reverting it.

This form is used for two purposes:
-- Submitting diff/oldid to (implied) action=view
-- Submitting ids-array to action=revisiondelete

That makes it complicated. Also for IE6/IE7 compatibility, there is no way to do this from the HTML itself (i.e. using <input type="submit" name="action" value="revisiondelete"> would work but leaves no option to have a custom i18n label. and <button type="submit" name="action" value="revisiondelete">I18N LABEL</button> works but IE7 submits "I18N LABEL" as value for "action" instead of "revision delete".

Will re-fix bug 33587 in a few minutes with a "progressive-enhancement" solution from the front-end instead.
Modified paths:
  • /trunk/phase3/includes/actions/HistoryAction.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/actions/HistoryAction.php
@@ -407,6 +407,7 @@
408408 $s = Html::openElement( 'form', array( 'action' => $wgScript,
409409 'id' => 'mw-history-compare' ) ) . "\n";
410410 $s .= Html::hidden( 'title', $this->getTitle()->getPrefixedDbKey() ) . "\n";
 411+ $s .= Html::hidden( 'action', 'historysubmit' ) . "\n";
411412
412413 $s .= '<div>' . $this->submitButton( $this->msg( 'compareselectedversions' )->text(),
413414 array( 'class' => 'historysubmit' ) ) . "\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r108380[mediawiki.action.history.js] Provide cleaner handling of action=historysubmi...krinkle02:08, 9 January 2012

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108341Remove action=history from submit on HistoryAction...krinkle00:52, 8 January 2012

Status & tagging log