From: daniel Date: Tue, 10 Jul 2018 14:39:37 +0000 (+0200) Subject: List deleted revisions in well defined order X-Git-Tag: 1.34.0-rc.0~4829^2 X-Git-Url: http://git.cyclocoop.org/?a=commitdiff_plain;h=fc19e1207c14170a61185f7324e1facc6fc52b9f;p=lhc%2Fweb%2Fwiklou.git List deleted revisions in well defined order Change-Id: I3040e0a3f6367809a22198b8b3f76048aa6c1562 --- diff --git a/includes/page/PageArchive.php b/includes/page/PageArchive.php index d051c1b602..e4e1271ad0 100644 --- a/includes/page/PageArchive.php +++ b/includes/page/PageArchive.php @@ -203,10 +203,10 @@ class PageArchive { 'ar_title' => $this->title->getDBkey(), ]; - // TODO: ORDER BY ar_timestamp DESC, ar_rev_id DESC, to remove ambiguity. - // HOWEVER this requires ar_rev_id to be added to the name_title_timestamp index first! - // Otherwise, adding this ar_rev_id to the order will result in a file sort! - $options = [ 'ORDER BY' => 'ar_timestamp DESC' ]; + // NOTE: ordering by ar_timestamp and ar_id, to remove ambiguity. + // XXX: Ideally, we would be ordering by ar_timestamp and ar_rev_id, but since we + // don't have an index on ar_rev_id, that causes a file sort. + $options = [ 'ORDER BY' => 'ar_timestamp DESC, ar_id DESC' ]; ChangeTags::modifyDisplayQuery( $queryInfo['tables'],