Bartosz Dziewoński has uploaded a new change for review. https://gerrit.wikimedia.org/r/89324
Change subject: Remove dead watchlist cutoff code ...................................................................... Remove dead watchlist cutoff code Added back in r1532, it got broken in one of the numerous refactors since then and now only triggers when 'days' request parameter is passed explicitly and is malformed. Just use floatval() instead. Change-Id: I20c1e816a11fca5037af93bf81b46839f2a5efb0 --- M includes/specials/SpecialWatchlist.php 1 file changed, 1 insertion(+), 13 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/24/89324/1 diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 59f0dfe..b54147c 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -121,7 +121,7 @@ # Extract variables from the request, falling back to user preferences or # other default values if these don't exist $values = array(); - $values['days'] = $request->getVal( 'days', $defaults['days'] ); + $values['days'] = floatval( $request->getVal( 'days', $defaults['days'] ) ); $values['hideMinor'] = (int)$request->getBool( 'hideMinor', $defaults['hideMinor'] ); $values['hideBots'] = (int)$request->getBool( 'hideBots', $defaults['hideBots'] ); $values['hideAnons'] = (int)$request->getBool( 'hideAnons', $defaults['hideAnons'] ); @@ -157,18 +157,6 @@ $values['namespace'] = $nameSpace; $values['invert'] = $invert; $values['associated'] = $associated; - - if ( is_null( $values['days'] ) || !is_numeric( $values['days'] ) ) { - $big = 1000; /* The magical big */ - if ( $nitems > $big ) { - # Set default cutoff shorter - $values['days'] = $defaults['days'] = ( 12.0 / 24.0 ); # 12 hours... - } else { - $values['days'] = $defaults['days']; # default cutoff for shortlisters - } - } else { - $values['days'] = floatval( $values['days'] ); - } // Dump everything here $nondefaults = array(); -- To view, visit https://gerrit.wikimedia.org/r/89324 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I20c1e816a11fca5037af93bf81b46839f2a5efb0 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits