Fix invalid ORDER BY
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 17 Apr 2007 15:35:51 +0000 (15:35 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 17 Apr 2007 15:35:51 +0000 (15:35 +0000)
includes/SpecialWhatlinkshere.php

index 45ebc50..f077cca 100644 (file)
@@ -100,11 +100,11 @@ class WhatLinksHerePage {
 
                if ( $from ) {
                        $offsetCond = "page_id >= $from";
-                       $options['ORDER BY'] = 'page_id';
                } else {
                        $offsetCond = false;
-                       $options['ORDER BY'] = 'page_id, is_template DESC';
                }
+               $options['ORDER BY'] = 'page_id';
+
                // Read an extra row as an at-end check
                $queryLimit = $limit + 1;
                $options['LIMIT'] = $queryLimit;