Improve revertedEdits autopromote check to include undoing of edits
authorAaron Schulz <aaron@users.mediawiki.org>
Sat, 17 Jan 2009 00:53:23 +0000 (00:53 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Sat, 17 Jan 2009 00:53:23 +0000 (00:53 +0000)
includes/EditPage.php

index 837447a..154abbc 100644 (file)
@@ -84,6 +84,7 @@ class EditPage {
 
        /* $didSave should be set to true whenever an article was succesfully altered. */
        public $didSave = false;
+       public $undidRev = 0;
 
        public $suppressIntro = false;
 
@@ -182,6 +183,7 @@ class EditPage {
                                                # If we just undid one rev, use an autosummary
                                                if ( $firstrev->mId == $undo ) {
                                                        $this->summary = wfMsgForContent( 'undo-summary', $undo, $undorev->getUserText() );
+                                                       $this->undidRev = $undo;
                                                }
                                                $this->formtype = 'diff';
                                        } else {