r68662 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68661‎ | r68662 | r68663 >
Date:15:43, 28 June 2010
Author:aaron
Status:reverted (Comments)
Tags:
Comment:
Improved b/c handling of old fi_img_timestamp defition
Modified paths:
  • /trunk/extensions/FlaggedRevs/FlaggedRevs.class.php (modified) (history)
  • /trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FlaggedRevs/FlaggedRevs.class.php
@@ -1458,8 +1458,8 @@
14591459 'fi_rev_id' => $rev->getId(),
14601460 'fi_name' => $dbkey,
14611461 'fi_img_sha1' => $sha1,
1462 - // b/c: NULL becomes '' for old fi_img_timestamp def (non-strict)
1463 - 'fi_img_timestamp' => $time ? $dbw->timestamp( $time ) : null
 1462+ // b/c: fi_img_timestamp DEFAULT either NULL (new) or '' (old)
 1463+ 'fi_img_timestamp' => $time ? $dbw->timestamp( $time ) : 'DEFAULT'
14641464 );
14651465 $imgset[] = $fileIncludeData;
14661466 }
Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php
@@ -382,8 +382,8 @@
383383 'fi_rev_id' => $rev->getId(),
384384 'fi_name' => $img_title->getDBkey(),
385385 'fi_img_sha1' => $key,
386 - // b/c: NULL becomes '' for old fi_img_timestamp def (non-strict)
387 - 'fi_img_timestamp' => $timestamp ? $dbw->timestamp( $timestamp ) : null
 386+ // b/c: fi_img_timestamp DEFAULT either NULL (new) or '' (old)
 387+ 'fi_img_timestamp' => $timestamp ? $dbw->timestamp( $timestamp ) : 'DEFAULT'
388388 );
389389 if ( !isset( $imgParams[$img_title->getDBkey()] ) ) {
390390 $imgParams[$img_title->getDBkey()] = array();

Follow-up revisions

RevisionCommit summaryAuthorDate
r68663MFT r68662aaron15:53, 28 June 2010
r68702Go back to '' for fi_img_timestamp for missing files (reverts r68662), until ...aaron03:36, 29 June 2010

Comments

#Comment by Aaron Schulz (talk | contribs)   20:12, 29 June 2010

This just uses the literal 'DEFAULT', not DEFAULT...sigh DB cleaned up already (affected a small # of rows).

This should use null eventually (broken on PG until it does).

Status & tagging log