private function setCommentStatus(Comment $p_comment, $p_status)
{
$em = $this->getEntityManager();
if ($p_status == 'deleted') {
$em->remove($p_comment);
} else {
$p_comment->setStatus($p_status);
$em->persist($p_comment);
}
$em->flush();
$cacheService = \Zend_Registry::get('container')->getService('newscoop.cache');
$cacheService->clearNamespace('comment');
$user = $p_comment->getCommenter()->getUser();
if ($user instanceof User) {
$em->getRepository('Newscoop\\Entity\\User')->setUserPoints($user);
}
}