Add an order by to the list of watched pages.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 31 Jul 2008 16:14:32 +0000 (16:14 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Thu, 31 Jul 2008 16:14:32 +0000 (16:14 +0000)
includes/WatchlistEditor.php

index fcfdb78..54f9d81 100644 (file)
@@ -208,6 +208,9 @@ class WatchlistEditor {
                $sql = "SELECT wl_namespace, wl_title, page_id, page_len, page_is_redirect
                        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();