Fix bug in r83814 reported on IRC: categorymembers did not set an ORDER BY when cmcon...
authorRoan Kattouw <catrope@users.mediawiki.org>
Wed, 5 Oct 2011 13:15:44 +0000 (13:15 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Wed, 5 Oct 2011 13:15:44 +0000 (13:15 +0000)
includes/api/ApiQueryCategoryMembers.php

index c1871a5..cdbc29a 100644 (file)
@@ -143,7 +143,9 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                                $contWhere = "cl_sortkey $op $escSortkey OR " .
                                        "(cl_sortkey = $escSortkey AND " .
                                        "cl_from $op= $from)";
-
+                               // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
+                               $this->addWhereRange( 'cl_sortkey', $dir, null, null );
+                               $this->addWhereRange( 'cl_from', $dir, null, null );
                        } else {
                                // The below produces ORDER BY cl_sortkey, cl_from, possibly with DESC added to each of them
                                $this->addWhereRange( 'cl_sortkey',