r43418 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43417‎ | r43418 | r43419 >
Date:18:55, 12 November 2008
Author:aaron
Status:old (Comments)
Tags:
Comment:
Add sessionfailure message
Modified paths:
  • /trunk/extensions/CodeReview/CodeRevisionCommitter.php (modified) (history)

Diff [purge]

Index: trunk/extensions/CodeReview/CodeRevisionCommitter.php
@@ -17,6 +17,11 @@
1818 function execute() {
1919 global $wgRequest, $wgOut, $wgUser;
2020
 21+ if( !$wgUser->matchEditToken( $wgRequest->getVal('wpEditToken') ) ) {
 22+ $wgOut->addHTML( wfMsg('sessionfailure') );
 23+ return;
 24+ }
 25+
2126 $redirTarget = null;
2227 $dbw = wfGetDB( DB_MASTER );
2328

Comments

#Comment by Brion VIBBER (talk | contribs)   22:38, 13 November 2008

Best thing here might be to show the warning, then show the form again with all the stuff filled out still with our changes (kind of like a preview); then you can just resubmit the form (now with a proper token) and it'll be ok. If you hit back and reload, you'll lose your changes and have to redo them :(

#Comment by Aaron Schulz (talk | contribs)   23:11, 13 November 2008

Done in r43463

Status & tagging log