change raw database quoting to use addQuotes
authorumherirrender <umherirrender_de.wp@web.de>
Sun, 26 Aug 2012 16:56:29 +0000 (18:56 +0200)
committerumherirrender <umherirrender_de.wp@web.de>
Sun, 26 Aug 2012 16:56:29 +0000 (18:56 +0200)
Change-Id: Ia734f958b1458224f998c5b59df2ff49e597f868

includes/SiteStats.php
includes/WikiPage.php

index 7f3f655..1c2c454 100644 (file)
@@ -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__
                );
index 5ec5819..9377ab4 100644 (file)
@@ -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__
                        );
                }