From bd8b22d90fc86cbb61260b2db063b0a1859f9ed5 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sun, 26 Aug 2012 18:56:29 +0200 Subject: [PATCH] change raw database quoting to use addQuotes Change-Id: Ia734f958b1458224f998c5b59df2ff49e597f868 --- includes/SiteStats.php | 4 ++-- includes/WikiPage.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/includes/SiteStats.php b/includes/SiteStats.php index 7f3f65556f..1c2c454d0d 100644 --- a/includes/SiteStats.php +++ b/includes/SiteStats.php @@ -347,8 +347,8 @@ class SiteStatsUpdate implements DeferrableUpdate { array( 'rc_user != 0', 'rc_bot' => 0, - "rc_log_type != 'newusers' OR rc_log_type IS NULL", - "rc_timestamp >= '{$dbw->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays*24*3600 )}'", + 'rc_log_type != ' . $dbr->addQuotes( 'newusers' ) . ' OR rc_log_type IS NULL', + 'rc_timestamp >= ' . $dbr->addQuotes( $dbr->timestamp( wfTimestamp( TS_UNIX ) - $wgActiveUserDays*24*3600 ) ), ), __METHOD__ ); diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 5ec58191d1..9377ab45f4 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -2383,7 +2383,7 @@ class WikiPage extends Page implements IDBAccessObject { array( /* WHERE */ 'rc_cur_id' => $current->getPage(), 'rc_user_text' => $current->getUserText(), - "rc_timestamp > '{$s->rev_timestamp}'", + 'rc_timestamp > ' . $dbw->addQuotes( $s->rev_timestamp ), ), __METHOD__ ); } -- 2.20.1