r38306 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38305‎ | r38306 | r38307 >
Date:16:34, 31 July 2008
Author:simetrical
Status:old
Tags:
Comment:
Fix r38302:
* PHP syntax error: mixing double and single quotes
* Probably an SQL syntax error too, due to lack of a space, unless "wl_user = 123ORDER BY wl_title" works in non-MySQL databases. It doesn't in MySQL, and if it does in other engines, it probably shouldn't. :)
Modified paths:
  • /trunk/phase3/includes/WatchlistEditor.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WatchlistEditor.php
@@ -208,8 +208,8 @@
209209 $sql = "SELECT wl_namespace, wl_title, page_id, page_len, page_is_redirect
210210 FROM {$watchlist} LEFT JOIN {$page} ON ( wl_namespace = page_namespace
211211 AND wl_title = page_title ) WHERE wl_user = {$uid}";
212 - if ( ! $dbr->implicitOrderby() ) {
213 - $sql .= "ORDER BY wl_title';
 212+ if ( !$dbr->implicitOrderby() ) {
 213+ $sql .= ' ORDER BY wl_title';
214214 }
215215 $res = $dbr->query( $sql, __METHOD__ );
216216 if( $res && $dbr->numRows( $res ) > 0 ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r38302Add an order by to the list of watched pages.greg16:14, 31 July 2008

Status & tagging log