From 22ae76c46526dce260675525e712f683f036afee Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Thu, 21 Apr 2005 07:26:52 +0000 Subject: [PATCH] * (bug 1163) Special:Undelete showed oldest revision instead of newest Patch from bug with slight modification (include the limit; if there are many we only want one here) --- includes/SpecialUndelete.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/SpecialUndelete.php b/includes/SpecialUndelete.php index e4b34b23ae..4a3c9af1b5 100644 --- a/includes/SpecialUndelete.php +++ b/includes/SpecialUndelete.php @@ -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 { -- 2.20.1