From 66f12e7209958e8e4c878beb5a8324b4f6df5e88 Mon Sep 17 00:00:00 2001 From: Greg Sabino Mullane Date: Sun, 9 Sep 2007 18:31:21 +0000 Subject: [PATCH] Don't pass getTimestamp output directly to the db without a wrap. --- includes/DifferenceEngine.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index e88234269c..e0647ee136 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -166,11 +166,12 @@ CONTROL; $rcid = $this->mRcidMarkPatrolled; } else { // Look for an unpatrolled change corresponding to this diff + $db = wfGetDB( DB_SLAVE ); $change = RecentChange::newFromConds( array( // Add redundant timestamp condition so we can use the // existing index - 'rc_timestamp' => $this->mNewRev->getTimestamp(), + 'rc_timestamp' => $db->timestamp( $this->mNewRev->getTimestamp() ), 'rc_this_oldid' => $this->mNewid, 'rc_last_oldid' => $this->mOldid, 'rc_patrolled' => 0, -- 2.20.1