From b986a12270c6c42899ca0cfd54c497946cba613c Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 5 Oct 2010 13:36:05 +0000 Subject: [PATCH] Make the watchlist query ordering consistent across DBs. --- includes/WatchlistEditor.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/includes/WatchlistEditor.php b/includes/WatchlistEditor.php index 0e5a59ef52..8b089d083e 100644 --- a/includes/WatchlistEditor.php +++ b/includes/WatchlistEditor.php @@ -212,6 +212,9 @@ class WatchlistEditor { $sql = "SELECT wl_namespace, wl_title, page_id, page_len, page_is_redirect, page_latest FROM {$watchlist} LEFT JOIN {$page} ON ( wl_namespace = page_namespace AND wl_title = page_title ) WHERE wl_user = {$uid}"; + if ( ! $dbr->implicitOrderby() ) { + $sql .= " ORDER BY wl_title"; + } $res = $dbr->query( $sql, __METHOD__ ); if( $res && $dbr->numRows( $res ) > 0 ) { $cache = LinkCache::singleton(); -- 2.20.1