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