Use spiffier variable swap method. Might not be as pretty as those iterators Tim...
authorAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 6 Jul 2007 07:11:58 +0000 (07:11 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Fri, 6 Jul 2007 07:11:58 +0000 (07:11 +0000)
includes/EditPage.php

index b5d967b..b86768d 100644 (file)
@@ -100,9 +100,7 @@ class EditPage {
 
                        if ($undo > 0 && $undoafter > 0 && $undo < $undoafter) {
                                # If they got undoafter and undo round the wrong way, switch them
-                               $temp = $undoafter;
-                               $undoafter = $undo;
-                               $undo = $temp;
+                               list( $undo, $undoafter ) = array( $undoafter, $undo );
                        }
 
                        if ( $undo > 0 && $undo > $undoafter ) {