Merge "Fix "UTPage" creation in tests"
[lhc/web/wiklou.git] / includes / specials / SpecialActiveusers.php
index dd6bec2..d963677 100644 (file)
@@ -38,18 +38,18 @@ class ActiveUsersPager extends UsersPager {
        protected $opts;
 
        /**
-        * @var Array
+        * @var array
         */
        protected $hideGroups = array();
 
        /**
-        * @var Array
+        * @var array
         */
        protected $hideRights = array();
 
        /**
-        * @param $context IContextSource
-        * @param $group null Unused
+        * @param IContextSource $context
+        * @param null $group Unused
         * @param string $par Parameter passed to the page
         */
        function __construct( IContextSource $context = null, $group = null, $par = null ) {
@@ -97,7 +97,8 @@ class ActiveUsersPager extends UsersPager {
                        'qcc_type' => 'activeusers',
                        'qcc_namespace' => NS_USER,
                        'user_name = qcc_title',
-                       'rc_user_text = qcc_title'
+                       'rc_user_text = qcc_title',
+                       'rc_type != ' . $dbr->addQuotes( RC_EXTERNAL ) // Don't count wikidata.
                );
                if ( $this->requestedUser != '' ) {
                        $conds[] = 'qcc_title >= ' . $dbr->addQuotes( $this->requestedUser );
@@ -229,7 +230,7 @@ class SpecialActiveUsers extends SpecialPage {
        /**
         * Show the special page
         *
-        * @param $par Mixed: parameter passed to the page or null
+        * @param string $par Parameter passed to the page or null
         */
        public function execute( $par ) {
                global $wgActiveUserDays;
@@ -269,8 +270,8 @@ class SpecialActiveUsers extends SpecialPage {
        }
 
        /**
-        * @param integer $period Seconds (do updates no more often than this)
-        * @return integer How many seconds old the cache is
+        * @param intr $period Seconds (do updates no more often than this)
+        * @return int How many seconds old the cache is
         */
        public static function mergeActiveUsers( $period ) {
                global $wgActiveUserDays;
@@ -310,7 +311,7 @@ class SpecialActiveUsers extends SpecialPage {
         * Update the query cache as needed
         *
         * @param DatabaseBase $dbw
-        * @param integer $window Maximum time range of new data to scan (in seconds)
+        * @param int $window Maximum time range of new data to scan (in seconds)
         * @return bool Success
         */
        protected static function doQueryCacheUpdate( DatabaseBase $dbw, $window ) {
@@ -340,6 +341,7 @@ class SpecialActiveUsers extends SpecialPage {
                        array( 'rc_user_text', 'lastedittime' => 'MAX(rc_timestamp)' ),
                        array(
                                'rc_user > 0', // actual accounts
+                               'rc_type != ' . $dbw->addQuotes( RC_EXTERNAL ), // no wikidata
                                'rc_log_type IS NULL OR rc_log_type != ' . $dbw->addQuotes( 'newusers' ),
                                'rc_timestamp >= ' . $dbw->addQuotes( $dbw->timestamp( $sTimestamp ) ),
                                'rc_timestamp <= ' . $dbw->addQuotes( $dbw->timestamp( $eTimestamp ) )