r84013 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r84012‎ | r84013 | r84014 >
Date:12:44, 15 March 2011
Author:werdna
Status:deferred
Tags:
Comment:
Only run post current version pointer updates for posts that already exist
Modified paths:
  • /branches/lqt-updates/extensions/LiquidThreads/classes/model/PostVersion.php (modified) (history)

Diff [purge]

Index: branches/lqt-updates/extensions/LiquidThreads/classes/model/PostVersion.php
@@ -467,8 +467,10 @@
468468 $this->id = $dbw->insertId();
469469
470470 // Update pointer
471 - $dbw->update( 'lqt_post', array( 'lqp_current_version', $this->id ),
472 - array( 'lqp_id' => $this->postID ), __METHOD__ );
 471+ if ( $this->postID ) {
 472+ $dbw->update( 'lqt_post', array( 'lqp_current_version', $this->id ),
 473+ array( 'lqp_id' => $this->postID ), __METHOD__ );
 474+ }
473475 }
474476
475477 /**

Status & tagging log