From: umherirrender Date: Tue, 12 Feb 2013 19:40:33 +0000 (+0100) Subject: Add url param 'extended' to Special:Watchlist X-Git-Tag: 1.31.0-rc.0~20662 X-Git-Url: http://git.cyclocoop.org/%24href?a=commitdiff_plain;h=55338e1597c51c7b20ffd0cde1d3588aab31db46;p=lhc%2Fweb%2Fwiklou.git Add url param 'extended' to Special:Watchlist This new url param allows overridding of the user option 'extendwatchlist' in the same way than, for example, 'enhanced' for 'usenewrc'. This is helpful to provide a extended enhanced watchlist per url. Without extendwatchlist a enhanced watchlist is not useful (no page groups possible) Also fixed the default for param namespace Change-Id: I115544005a621ee01a0ed0970a13099af92f42e7 --- diff --git a/includes/specials/SpecialWatchlist.php b/includes/specials/SpecialWatchlist.php index 1983542469..39bf14c62a 100644 --- a/includes/specials/SpecialWatchlist.php +++ b/includes/specials/SpecialWatchlist.php @@ -108,7 +108,8 @@ class SpecialWatchlist extends SpecialPage { /* bool */ 'hideLiu' => (int)$user->getBoolOption( 'watchlisthideliu' ), /* bool */ 'hidePatrolled' => (int)$user->getBoolOption( 'watchlisthidepatrolled' ), /* bool */ 'hideOwn' => (int)$user->getBoolOption( 'watchlisthideown' ), - /* ? */ 'namespace' => 'all', + /* bool */ 'extended' => (int)$user->getBoolOption( 'extendwatchlist' ), + /* ? */ 'namespace' => '', //means all /* ? */ 'invert' => false, /* bool */ 'associated' => false, ); @@ -127,6 +128,7 @@ class SpecialWatchlist extends SpecialPage { $prefs['hideliu'] = $user->getBoolOption( 'watchlisthideliu' ); $prefs['hideown'] = $user->getBoolOption( 'watchlisthideown' ); $prefs['hidepatrolled'] = $user->getBoolOption( 'watchlisthidepatrolled' ); + $prefs['extended'] = $user->getBoolOption( 'extendwatchlist' ); # Get query variables $values = array(); @@ -137,6 +139,7 @@ class SpecialWatchlist extends SpecialPage { $values['hideLiu'] = (int)$request->getBool( 'hideLiu', $prefs['hideliu'] ); $values['hideOwn'] = (int)$request->getBool( 'hideOwn', $prefs['hideown'] ); $values['hidePatrolled'] = (int)$request->getBool( 'hidePatrolled', $prefs['hidepatrolled'] ); + $values['extended'] = (int)$request->getBool( 'extended', $prefs['extended'] ); foreach( $this->customFilters as $key => $params ) { $values[$key] = (int)$request->getBool( $key ); } @@ -232,7 +235,7 @@ class SpecialWatchlist extends SpecialPage { } # Toggle watchlist content (all recent edits or just the latest) - if( $user->getOption( 'extendwatchlist' ) ) { + if( $values['extended'] ) { $limitWatchlist = intval( $user->getOption( 'wllimit' ) ); $usePage = false; } else {