Do not use a global $action to get the action.
authorPlatonides <platonides@users.mediawiki.org>
Sun, 25 Jul 2010 18:16:25 +0000 (18:16 +0000)
committerPlatonides <platonides@users.mediawiki.org>
Sun, 25 Jul 2010 18:16:25 +0000 (18:16 +0000)
includes/specials/SpecialMovepage.php

index 51c84de..8fa5ea8 100644 (file)
@@ -26,7 +26,7 @@
  * Constructor
  */
 function wfSpecialMovepage( $par = null ) {
-       global $wgUser, $wgOut, $wgRequest, $action;
+       global $wgUser, $wgOut, $wgRequest;
 
        # Check for database lock
        if ( wfReadOnly() ) {
@@ -61,7 +61,7 @@ function wfSpecialMovepage( $par = null ) {
 
        $form = new MovePageForm( $oldTitle, $newTitle );
 
-       if ( 'submit' == $action && $wgRequest->wasPosted()
+       if ( 'submit' == $wgRequest->getVal( 'action' ) && $wgRequest->wasPosted()
                && $wgUser->matchEditToken( $wgRequest->getVal( 'wpEditToken' ) ) ) {
                $form->doSubmit();
        } else {