Make ORDER BY a true options array, per bug 9609.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 17 Apr 2007 14:07:07 +0000 (14:07 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Tue, 17 Apr 2007 14:07:07 +0000 (14:07 +0000)
RELEASE-NOTES
includes/SpecialWhatlinkshere.php

index beefb39..cdb4998 100644 (file)
@@ -321,6 +321,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * Removed obsoletes Title::getRelatedCache and Title:touchArray
 * (bug 7285) Check MySQL username length during install
 * (bug 6910) Correct date/time formats in Vietnamese (vi)
+* (bug 9609) Correctly use ORDER BY in SpecialWhatlinkshere.php
 
 == Maintenance ==
 
index 6fdeaa0..45ebc50 100644 (file)
@@ -70,6 +70,7 @@ class WhatLinksHerePage {
                global $wgOut;
                $fname = 'WhatLinksHerePage::showIndirectLinks';
                $dbr = wfGetDB( DB_READ );
+               $options = array();
 
                $ns = $this->request->getIntOrNull( 'namespace' );
                if ( isset( $ns ) ) {
@@ -99,10 +100,10 @@ class WhatLinksHerePage {
 
                if ( $from ) {
                        $offsetCond = "page_id >= $from";
-                       $options = array( 'ORDER BY page_id' );
+                       $options['ORDER BY'] = 'page_id';
                } else {
                        $offsetCond = false;
-                       $options = array( 'ORDER BY page_id,is_template DESC' );
+                       $options['ORDER BY'] = 'page_id, is_template DESC';
                }
                // Read an extra row as an at-end check
                $queryLimit = $limit + 1;