[Isocial-svn] SF.net SVN: isocial: [67] app/controllers/message_controller.php
Status: Pre-Alpha
Brought to you by:
aguidrevitch
From: <agu...@us...> - 2008-03-11 20:13:56
|
Revision: 67 http://isocial.svn.sourceforge.net/isocial/?rev=67&view=rev Author: aguidrevitch Date: 2008-03-11 13:13:41 -0700 (Tue, 11 Mar 2008) Log Message: ----------- thread deletion improvements Modified Paths: -------------- app/controllers/message_controller.php Modified: app/controllers/message_controller.php =================================================================== --- app/controllers/message_controller.php 2008-03-11 20:05:46 UTC (rev 66) +++ app/controllers/message_controller.php 2008-03-11 20:13:41 UTC (rev 67) @@ -170,7 +170,10 @@ foreach ($threads as $thread_loop_key => $thread) { $this->Message->updateAll("is_sender_del = 1", "sender_id = " . $this->current_user->getId() . " AND thread_id = " . $thread->thread_id); $this->Message->updateAll("is_recipient_del = 1", "recipient_id = " . $this->current_user->getId() . " AND thread_id = " . $thread->thread_id); - $this->Message->destroyAll("is_sender_del = 1 AND is_recipient_del = 1 AND thread_id = " . $thread->thread_id); + $thread->reload(); + if ($thread->is_sender_del && $thread->is_recipient_del) { + $this->Message->destroyAll("thread_id = " . $thread->thread_id); + } } } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |