Special:Undelete doesn't update page_latest when undeleted revision was newer than...
authorRiver Tarnell <river@users.mediawiki.org>
Tue, 8 May 2007 09:26:58 +0000 (09:26 +0000)
committerRiver Tarnell <river@users.mediawiki.org>
Tue, 8 May 2007 09:26:58 +0000 (09:26 +0000)
includes/SpecialUndelete.php

index c31709b..7a322db 100644 (file)
@@ -418,11 +418,10 @@ class PageArchive {
                }
 
                if( $revision ) {
-                       # FIXME: Update latest if newer as well...
-                       if( $newid ) {
-                               // Attach the latest revision to the page...
-                               $article->updateRevisionOn( $dbw, $revision, $previousRevId );
-                               
+                       // Attach the latest revision to the page...
+                       $wasnew = $article->updateIfNewerOn( $dbw, $revision, $previousRevId );
+
+                       if( $newid || $wasnew ) {
                                // Update site stats, link tables, etc
                                $article->createUpdates( $revision );
                        }