* optional parameter for [[Special:Listusers]]
authorAntoine Musso <hashar@users.mediawiki.org>
Wed, 13 Jul 2005 15:14:12 +0000 (15:14 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Wed, 13 Jul 2005 15:14:12 +0000 (15:14 +0000)
* Fix #2832 : correctly redirect [[Special:Listadmins]]

RELEASE-NOTES
includes/SpecialListusers.php
includes/SpecialPage.php

index 87f70cd..6db852d 100644 (file)
@@ -566,7 +566,8 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * (bug 2825) Fix regression in newtalk notifications for anons w/ enotif off
 * (bug 2833) Fix bug in previous fix
 * With $wgCapitalLinks off, accept off-by-first-letter-case in 'go' match
-
+* Optional parameters for [[Special:Listusers]]
+* (bug 2832) [[Special:Listadmins]] redirects to [[Special:Listusers/sysop]]
 
 === Caveats ===
 
index 8b26bed..892bbd6 100644 (file)
@@ -183,18 +183,21 @@ class ListUsersPage extends QueryPage {
 
 /**
  * constructor
+ * $par string (optional) A group to list users from
  */
-function wfSpecialListusers() {
+function wfSpecialListusers( $par = null ) {
        global $wgRequest;
 
        list( $limit, $offset ) = wfCheckLimits();
 
+
        $slu = new ListUsersPage();
        
        /**
         * Get some parameters
         */
-       $slu->requestedGroup = $wgRequest->getVal('group');
+       $groupTarget = isset($par) ? $par : $wgRequest->getVal( 'group' );
+       $slu->requestedGroup = $groupTarget;
        $slu->requestedUser = $wgRequest->getVal('username');
 
        return $slu->doQuery( $offset, $limit );
index 5f67310..b911893 100644 (file)
@@ -189,7 +189,7 @@ class SpecialPage
                        case 'Mycontributions':
                                return Title::makeTitle( NS_SPECIAL, 'Contributions/' . $wgUser->getName() );
                        case 'Listadmins':
-                               return Title::makeTitle( NS_SPECIAL, 'Listusers' );
+                               return Title::makeTitle( NS_SPECIAL, 'Listusers/'.'sysop' ); # bug 2832
                        case 'Randompage':
                                return Title::makeTitle( NS_SPECIAL, 'Random' );
                        default: