Proyectos de Subversion LeadersLinked - Backend

Rev

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

Rev 8407 Rev 8408
Línea 293... Línea 293...
293
                
293
                
294
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
294
                $companyUserMapper = CompanyUserMapper::getInstance($this->adapter);
Línea 295... Línea 295...
295
                $owner = $companyUserMapper->fetchOwnerByCompanyId($currentCompany->id);
295
                $owner = $companyUserMapper->fetchOwnerByCompanyId($currentCompany->id);
296
                
296
                
297
                $dataPost = (array) $form->getData();
297
                $dataPost = (array) $form->getData();
298
                $comment = new Comment();
298
                $answer = new Comment();
Línea 299... Línea 299...
299
                $comment->comment = $dataPost['answer'];
299
                $answer->comment = $dataPost['answer'];
300
                $comment->feed_id = $feed->id;
300
                $answer->feed_id = $feed->id;
Línea 301... Línea 301...
301
                
301
                
302
                if($feed->type=='hptg'){
302
                if($feed->type=='hptg'){
Línea 303... Línea 303...
303
                    $comment->user_id = $currentUser->id;
303
                    $answer->user_id = $currentUser->id;
304
 
304
 
305
                }else{
305
                }else{
-
 
306
                    $answer->user_id = $owner->user_id;
-
 
307
 
-
 
308
                }
306
                    $comment->user_id = $owner->user_id;
309
 
Línea 307... Línea 310...
307
 
310
                $commentMapper = CommentMapper::getInstance($this->adapter);
Línea 308... Línea 311...
308
                }
311
                $comment=$commentMapper->fetchOneByUuid($comment_uuid);
309
                
312
                $answer->parent_id = $comment->id;
Línea 310... Línea 313...
310
                $commentMapper = CommentMapper::getInstance($this->adapter);
313
                
311
                if($commentMapper->insert($comment)) {
314
                if($commentMapper->insert($answer)) {
312
                    
315
                    
313
                    $total_comments = $commentMapper->fetchCountCommentByFeedId($comment->feed_id);
316
                    $total_comments = $commentMapper->fetchCountCommentByFeedId($comment->feed_id);
314
                    
317
                    
Línea 315... Línea 318...
315
                    $feed->total_comments = $total_comments;
318
                    $feed->total_comments = $total_comments;