From cf6a63a3943cdca75b50f68455d5bb9dc77d0e31 Mon Sep 17 00:00:00 2001 From: John Du Hart Date: Sat, 26 Nov 2011 20:58:15 +0000 Subject: [PATCH] Bug 32666 - Special:ActiveUsers should use given subpage as username and prefill the input field --- RELEASE-NOTES-1.19 | 2 ++ includes/specials/SpecialActiveusers.php | 11 ++++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 84da0da066..3926365585 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -95,6 +95,8 @@ production. containing HTML or JS. DISABLING THESE CHECKS IS VERY DANGEROUS. * New path mappings can be added using the WebRequestPathInfoRouter hook and adding paths to the PathRouter. +* (bug 32666) Special:ActiveUsers now allows a subpage to be used as the + username (eg. Special:ActiveUsers/Username) === Bug fixes in 1.19 === * $wgUploadNavigationUrl should be used for file redlinks if. diff --git a/includes/specials/SpecialActiveusers.php b/includes/specials/SpecialActiveusers.php index 7b6590332f..617a802690 100644 --- a/includes/specials/SpecialActiveusers.php +++ b/includes/specials/SpecialActiveusers.php @@ -42,13 +42,18 @@ class ActiveUsersPager extends UsersPager { */ protected $groups; - function __construct( IContextSource $context = null, $group = null ) { + /** + * @param $context IContextSource + * @param $group null Unused + * @param $par string Parameter passed to the page + */ + function __construct( IContextSource $context = null, $group = null, $par = null ) { global $wgActiveUserDays; parent::__construct( $context ); $this->RCMaxAge = $wgActiveUserDays; - $un = $this->getRequest()->getText( 'username' ); + $un = $this->getRequest()->getText( 'username', $par ); $this->requestedUser = ''; if ( $un != '' ) { $username = Title::makeTitleSafe( NS_USER, $un ); @@ -192,7 +197,7 @@ class SpecialActiveUsers extends SpecialPage { $out->wrapWikiMsg( "
\n$1\n
", array( 'activeusers-intro', $this->getLanguage()->formatNum( $wgActiveUserDays ) ) ); - $up = new ActiveUsersPager( $this->getContext() ); + $up = new ActiveUsersPager( $this->getContext(), null, $par ); # getBody() first to check, if empty $usersbody = $up->getBody(); -- 2.20.1