Follow-up 262fd58: Correctly apply the ORDER BY in ActiveUsersPager
authormainframe98 <k.s.werf@hotmail.com>
Tue, 19 Feb 2019 15:01:59 +0000 (16:01 +0100)
committerJforrester <jforrester@wikimedia.org>
Tue, 19 Feb 2019 15:27:04 +0000 (15:27 +0000)
In 262fd58, an ORDER BY clause was added, but the direction it
is supposed to use was not loaded correctly from the $data array.
It is available under the key 'order', not 'dir'.

Bug: T216200
Change-Id: I5e675c98820813cd9107865e11e82ae57828a974

includes/specials/pagers/ActiveUsersPager.php

index 3fac73c..aedb9e6 100644 (file)
@@ -99,7 +99,7 @@ class ActiveUsersPager extends UsersPager {
                ];
                $options = [];
                if ( $data !== null ) {
-                       $options['ORDER BY'] = 'qcc_title ' . $data['dir'];
+                       $options['ORDER BY'] = 'qcc_title ' . $data['order'];
                        $options['LIMIT'] = $data['limit'];
                        $conds = array_merge( $conds, $data['conds'] );
                }