Fix Special:Activeusers for SQLite
authorMax Semenik <maxsem@users.mediawiki.org>
Wed, 11 Nov 2009 16:29:44 +0000 (16:29 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Wed, 11 Nov 2009 16:29:44 +0000 (16:29 +0000)
includes/specials/SpecialActiveusers.php

index 105be73..0870fc3 100644 (file)
@@ -48,6 +48,8 @@ class ActiveUsersPager extends UsersPager {
        }
 
        function getQueryInfo() {
+               global $wgDBtype;
+
                $dbr = wfGetDB( DB_SLAVE );
                $conds = array( 'rc_user > 0' ); // Users - no anons
                $conds[] = 'ipb_deleted IS NULL'; // don't show hidden names
@@ -65,7 +67,7 @@ class ActiveUsersPager extends UsersPager {
                                'MAX(ipb_user) AS blocked'
                        ),
                        'options' => array(
-                               'GROUP BY' => $dbr->implicitGroupby() ? 'rc_user_text' : 'rc_user_text, user_id',
+                               'GROUP BY' => ( $dbr->implicitGroupby() || $wgDBtype == 'sqlite' ) ? 'rc_user_text' : 'rc_user_text, user_id',
                                'USE INDEX' => array( 'recentchanges' => 'rc_user_text' )
                        ),
                        'join_conds' => array(