r45715 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45714‎ | r45715 | r45716 >
Date:18:55, 13 January 2009
Author:brion
Status:ok
Tags:
Comment:
Cleanup for r45526: use addQuotes rather than strencode on a timestamp parameter. MySQL will let you slip on that with our current timestamps, but PG won't and it's a bad practice.
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -624,7 +624,7 @@
625625 $nextTimestamp = $dbw->selectField( 'revision',
626626 'rev_timestamp',
627627 array( 'rev_page' => $article->getId(),
628 - "rev_timestamp > ".$dbw->strencode( $dbw->timestamp($timestamp) ) ),
 628+ "rev_timestamp > ".$dbw->addQuotes( $dbw->timestamp($timestamp) ) ),
629629 __METHOD__,
630630 array( 'ORDER BY' => 'rev_timestamp ASC', 'LIMIT' => 1 )
631631 );

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r45526(bug 16924) Deleting and restoring versions will result in entry on OldReview...aaron21:56, 7 January 2009

Status & tagging log