added enabled field so you can disable the cache thing if you need to before its...
[lhc/web/wiklou.git] / includes / specials / SpecialActiveusers.php
index 7b65903..8f4a943 100644 (file)
@@ -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 );
@@ -124,7 +129,7 @@ class ActiveUsersPager extends UsersPager {
                $list = array();
                foreach( self::getGroups( $row->user_id ) as $group ) {
                        if ( isset( $this->groups[$group] ) ) {
-                               return;
+                               return '';
                        }
                        $list[] = self::buildGroupLink( $group, $userName );
                }
@@ -192,7 +197,7 @@ class SpecialActiveUsers extends SpecialPage {
                $out->wrapWikiMsg( "<div class='mw-activeusers-intro'>\n$1\n</div>",
                        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();