* (bug 1163) Special:Undelete showed oldest revision instead of newest
authorBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Apr 2005 07:26:52 +0000 (07:26 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Thu, 21 Apr 2005 07:26:52 +0000 (07:26 +0000)
Patch from bug with slight modification (include the limit; if there are
many we only want one here)

includes/SpecialUndelete.php

index e4b34b2..4a3c9af 100644 (file)
@@ -97,7 +97,8 @@ class PageArchive {
                        array( 'ar_namespace' => $this->title->getNamespace(),
                               'ar_title' => $this->title->getDBkey() ),
                        'PageArchive::getLastRevisionText',
-                       'ORDER BY ar_timestamp DESC LIMIT 1' );
+                       array( 'ORDER BY' => 'ar_timestamp DESC',
+                              'LIMIT' => '1' ) );
                if( $row ) {
                        return Revision::getRevisionText( $row, "ar_" );
                } else {