r77487 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r77486‎ | r77487 | r77488 >
Date:18:21, 30 November 2010
Author:platonides
Status:ok
Tags:
Comment:
Replace addslashes with Database::addQuotes()
Modified paths:
  • /trunk/phase3/includes/db/Database.php (modified) (history)
  • /trunk/phase3/includes/db/DatabaseOracle.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/DatabaseOracle.php
@@ -1348,7 +1348,7 @@
13491349 // Ordinary variables
13501350 foreach ( $varnames as $var ) {
13511351 if ( isset( $GLOBALS[$var] ) ) {
1352 - $val = addslashes( $GLOBALS[$var] ); // FIXME: safety check?
 1352+ $val = $this->addQuotes( $GLOBALS[$var] ); // FIXME: safety check?
13531353 $ins = str_replace( '{$' . $var . '}', $val, $ins );
13541354 $ins = str_replace( '/*$' . $var . '*/`', '`' . $val, $ins );
13551355 $ins = str_replace( '/*$' . $var . '*/', $val, $ins );
Index: trunk/phase3/includes/db/Database.php
@@ -2478,7 +2478,7 @@
24792479 // Ordinary variables
24802480 foreach ( $varnames as $var ) {
24812481 if ( isset( $GLOBALS[$var] ) ) {
2482 - $val = addslashes( $GLOBALS[$var] ); // FIXME: safety check?
 2482+ $val = $this->addQuotes( $GLOBALS[$var] ); // FIXME: safety check?
24832483 $ins = str_replace( '{$' . $var . '}', $val, $ins );
24842484 $ins = str_replace( '/*$' . $var . '*/`', '`' . $val, $ins );
24852485 $ins = str_replace( '/*$' . $var . '*/', $val, $ins );

Follow-up revisions

RevisionCommit summaryAuthorDate
r77713Fix a bug in the installer caused by r77487 creating installer sql statements...dantman09:27, 4 December 2010

Status & tagging log