X-Git-Url: https://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=blobdiff_plain;f=includes%2Fspecials%2FSpecialWatchlist.php;h=9e01d2d450b50ed7230ca640c3f04da61c4e9f87;hp=549362f20ffce2e0f33ef5f335a33f50987bf9f3;hb=d5a7166771613dfe4ed9fb75fa5efeced6134bd1;hpb=2a1b1880eaadd4c35bc789870a45e45f14ffdb26 diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 549362f20f..9e01d2d450 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -277,7 +277,6 @@ class SpecialWatchlist extends ChangesListSpecialPage { # Toggle watchlist content (all recent edits or just the latest) if ( $opts['extended'] ) { - $limitWatchlist = $user->getIntOption( 'wllimit' ); $usePage = false; } else { # Top log Ids for a page are not stored @@ -292,14 +291,16 @@ class SpecialWatchlist extends ChangesListSpecialPage { LIST_OR ); } - $limitWatchlist = 0; $usePage = true; } $tables = array_merge( [ 'recentchanges', 'watchlist' ], $tables ); $fields = array_merge( RecentChange::selectFields(), $fields ); - $query_options = array_merge( [ 'ORDER BY' => 'rc_timestamp DESC' ], $query_options ); + $query_options = array_merge( [ + 'ORDER BY' => 'rc_timestamp DESC', + 'LIMIT' => $user->getIntOption( 'wllimit' ) + ], $query_options ); $join_conds = array_merge( [ 'watchlist' => [ @@ -317,9 +318,6 @@ class SpecialWatchlist extends ChangesListSpecialPage { if ( $this->getConfig()->get( 'ShowUpdatedMarker' ) ) { $fields[] = 'wl_notificationtimestamp'; } - if ( $limitWatchlist ) { - $query_options['LIMIT'] = $limitWatchlist; - } $rollbacker = $user->isAllowed( 'rollback' ); if ( $usePage || $rollbacker ) {