Proyectos de Subversion LeadersLinked - Antes de SPA

Rev

Rev 5664 | Rev 5666 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 5664 Rev 5665
Línea 902... Línea 902...
902
 
902
 
903
 
903
 
904
    private function deleteConversation($conversation)
904
    private function deleteConversation($conversation)
-
 
905
    {
-
 
906
        $conversationMapper = ConversationMapper::getInstance($this->adapter);
Línea 905... Línea 907...
905
    {
907
        $currentUserPlugin = $this->plugin('currentUserPlugin');
906
        $conversationMapper = ConversationMapper::getInstance($this->adapter);
908
        $currentUser = $currentUserPlugin->getUser();
907
 
909
 
908
        if ($conversation->sender_id) {
910
        if ($conversation->sender_id == $currentUser->id) {
909
            $conversation->sender_status = Conversation::STATUS_DELETED;
911
            $conversation->sender_status = Conversation::STATUS_DELETED;
910
            if ($conversationMapper->update($conversation)) {
912
            if ($conversationMapper->update($conversation)) {
Línea 920... Línea 922...
920
                    'data' => $conversationMapper->getError()
922
                    'data' => $conversationMapper->getError()
921
                ];
923
                ];
922
            }
924
            }
923
        }
925
        }
Línea 924... Línea 926...
924
 
926
 
925
        if ($conversation->receiver_id) {
927
        if ($conversation->receiver_id == $currentUser->id) {
926
            $conversation->receiver_status = Conversation::STATUS_DELETED;
928
            $conversation->receiver_status = Conversation::STATUS_DELETED;
927
            if ($conversationMapper->update($conversation)) {
929
            if ($conversationMapper->update($conversation)) {
928
                $response = [
930
                $response = [
929
                    'success' => true,
931
                    'success' => true,