From 6c6a2295d673db826fab5e99c6c5cffb1c9131f9 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Tue, 17 Apr 2007 14:07:07 +0000 Subject: [PATCH] Make ORDER BY a true options array, per bug 9609. --- RELEASE-NOTES | 1 + includes/SpecialWhatlinkshere.php | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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; -- 2.20.1