Use $dbw->addQuotes :)
authorAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 19:08:27 +0000 (19:08 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Mon, 13 Oct 2008 19:08:27 +0000 (19:08 +0000)
includes/EditPage.php

index afc3306..4196a67 100644 (file)
@@ -1031,8 +1031,10 @@ class EditPage {
                $dbw = wfGetDB( DB_MASTER );
                $res = $dbw->select( 'revision',
                        'rev_user',
-                       array( 'rev_page' => $this->mArticle->getId(),
-                               "rev_timestamp > '".$dbw->timestamp($edittime)."'" ),
+                       array( 
+                               'rev_page' => $this->mArticle->getId(),
+                               'rev_timestamp > '.$dbw->addQuotes( $dbw->timestamp($edittime) )
+                       ),
                        __METHOD__,
                        array( 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 20 ) );
                while( $row = $res->fetchObject() ) {