From: Greg Sabino Mullane Date: Tue, 17 Apr 2007 14:07:07 +0000 (+0000) Subject: Make ORDER BY a true options array, per bug 9609. X-Git-Tag: 1.31.0-rc.0~53377 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=6c6a2295d673db826fab5e99c6c5cffb1c9131f9;p=lhc%2Fweb%2Fwiklou.git Make ORDER BY a true options array, per bug 9609. --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index beefb398af..cdb49983f2 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/SpecialWhatlinkshere.php b/includes/SpecialWhatlinkshere.php index 6fdeaa0bfb..45ebc503f5 100644 --- a/includes/SpecialWhatlinkshere.php +++ b/includes/SpecialWhatlinkshere.php @@ -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;