r68559 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68558‎ | r68559 | r68560 >
Date:09:36, 25 June 2010
Author:midom
Status:ok
Tags:
Comment:
r68558 fixes: add some escaping (just in case, not really needed), as well as import the variable via global
Modified paths:
  • /trunk/phase3/includes/db/DatabaseMysql.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseMysql.php
@@ -114,8 +114,10 @@
115115 $this->query( 'SET NAMES utf8', __METHOD__ );
116116 }
117117 // Set SQL mode, default is turning them all off, can be overridden or skipped with null
118 - if (is_string($wgSQLMode)) {
119 - $this->query( "SET sql_mode = '$wgSQLMode'", __METHOD__ );
 118+ global $wgSQLMode;
 119+ if ( is_string( $wgSQLMode ) ) {
 120+ $mode = $this->addQuotes( $wgSQLMode );
 121+ $this->query( "SET sql_mode = $mode", __METHOD__ );
120122 }
121123 }
122124

Follow-up revisions

RevisionCommit summaryAuthorDate
r68713merging in r68558 and r68559midom08:12, 29 June 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r68558Adding $wgSQLMode...midom09:19, 25 June 2010

Status & tagging log