r85594 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r85593‎ | r85594 | r85595 >
Date:23:52, 6 April 2011
Author:reedy
Status:ok
Tags:
Comment:
Fixup SQL quoting on extension
Modified paths:
  • /trunk/extensions/SubPageList3/SubPageList3.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SubPageList3/SubPageList3.php
@@ -362,9 +362,9 @@
363363 $order = strtoupper( $this->order );
364364
365365 if( $this->ordermethod == 'title' ) {
366 - $options['ORDER BY'] = '`page_title`' . $order;
 366+ $options['ORDER BY'] = 'page_title' . $order;
367367 } else if( $this->ordermethod == 'lastedit' ) {
368 - $options['ORDER BY'] = '`page_touched` ' . $order;
 368+ $options['ORDER BY'] = 'page_touched ' . $order;
369369 }
370370 if( $this->parent !== -1) {
371371 $this->ptitle = Title::newFromText( $this->parent );
@@ -392,7 +392,7 @@
393393 $conditions['page_namespace'] = $nsi;
394394 }
395395 $conditions['page_is_redirect'] = 0;
396 - $conditions[] = '`page_title` ' . $dbr->buildLike( $parent . '/', $dbr->anyString() );
 396+ $conditions[] = 'page_title ' . $dbr->buildLike( $parent . '/', $dbr->anyString() );
397397
398398 $fields = array();
399399 $fields[] = 'page_title';

Follow-up revisions

RevisionCommit summaryAuthorDate
r90653Fix SQL error due to r85594: missing space after page_title. Apparently "orde...tstarling07:19, 23 June 2011

Status & tagging log