r53171 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r53170‎ | r53171 | r53172 >
Date:15:32, 13 July 2009
Author:werdna
Status:deferred
Tags:
Comment:
Mark threads as read by all users when they're deleted
Modified paths:
  • /trunk/extensions/LiquidThreads/classes/LqtThread.php (modified) (history)

Diff [purge]

Index: trunk/extensions/LiquidThreads/classes/LqtThread.php
@@ -200,7 +200,12 @@
201201 $this->type = Threads::TYPE_DELETED;
202202 $this->revisionNumber += 1;
203203 $this->commitRevision( Threads::CHANGE_DELETED, $this, $reason );
204 - /* TODO: mark thread as read by all users, or we get blank thingies in New Messages. */
 204+ /* Mark thread as read by all users, or we get blank thingies in New Messages. */
 205+
 206+ $dbw = wfGetDB( DB_MASTER );
 207+
 208+ $dbw->delete( 'user_message_state', array( 'ums_thread' => $this->id() ),
 209+ __METHOD__ );
205210 }
206211
207212 function undelete( $reason ) {

Status & tagging log