Don't pass getTimestamp output directly to the db without a wrap.
authorGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 9 Sep 2007 18:31:21 +0000 (18:31 +0000)
committerGreg Sabino Mullane <greg@users.mediawiki.org>
Sun, 9 Sep 2007 18:31:21 +0000 (18:31 +0000)
includes/DifferenceEngine.php

index e882342..e0647ee 100644 (file)
@@ -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,