r97323 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r97322‎ | r97323 | r97324 >
Date:19:09, 16 September 2011
Author:aaron
Status:ok
Tags:
Comment:
Patch to support new fr_rev_timestamp column if it either exists or not
Modified paths:
  • /branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php (modified) (history)

Diff [purge]

Index: branches/wmf/1.17wmf1/extensions/FlaggedRevs/FlaggedRevision.php
@@ -310,6 +310,10 @@
311311 'fr_img_timestamp' => $dbw->timestampOrNull( $this->getFileTimestamp() ),
312312 'fr_img_sha1' => $this->getFileSha1()
313313 );
 314+ # Intermediate code for wmf schema change
 315+ if ( $dbw->fieldExists( 'flaggedrevs', 'fr_rev_timestamp' ) ) {
 316+ $revRow['fr_rev_timestamp'] = $dbw->timestamp( $this->getRevTimestamp() );
 317+ }
314318 # Update flagged revisions table
315319 $dbw->replace( 'flaggedrevs',
316320 array( array( 'fr_page_id', 'fr_rev_id' ) ), $revRow, __METHOD__ );

Status & tagging log