FIX - ошибка в уведомлениях если комментарий удалён
This commit is contained in:
parent
def7ffbc24
commit
71812dc37d
|
|
@ -12,17 +12,23 @@ switch ($notification->type) {
|
|||
break;
|
||||
case Notifications::typeNewCommentPoint:
|
||||
$comment = $notification->RefComment;
|
||||
$point = Point::model()->getByPK($comment->parentId);
|
||||
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/point/'.$point->id.'#comment'.$comment->id.'">комментарий</a> к точке <a href="/point/'.$point->id.'">"'.$point->name.'"</a>.';
|
||||
if ($comment) {
|
||||
$point = Point::model()->getByPK($comment->parentId);
|
||||
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/point/'.$point->id.'#comment'.$comment->id.'">комментарий</a> к точке <a href="/point/'.$point->id.'">"'.$point->name.'"</a>.';
|
||||
}
|
||||
break;
|
||||
case Notifications::typeNewCommentArticle:
|
||||
$comment = $notification->RefComment;
|
||||
$article = Article::model()->getByPK($comment->parentId);
|
||||
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/article/'.$article->id.'#comment'.$comment->id.'">комментарий</a> к статье <a href="/article/'.$article->id.'">"'.$article->title.'"</a>.';
|
||||
if ($comment) {
|
||||
$article = Article::model()->getByPK($comment->parentId);
|
||||
print strftime('%d %b %H:%M', $notification->date).' — Новый <a href="/article/'.$article->id.'#comment'.$comment->id.'">комментарий</a> к статье <a href="/article/'.$article->id.'">"'.$article->title.'"</a>.';
|
||||
}
|
||||
break;
|
||||
case Notifications::typeReply:
|
||||
$comment = $notification->RefComment;
|
||||
print strftime('%d %b %H:%M', $notification->date).' — '.$comment->RefUser->nick.' <a href="/'.$comment->parentType.'/'.$comment->parentId.'#comment'.$comment->id.'">ответил(-а)</a> на ваш комментарий.';
|
||||
if ($comment) {
|
||||
print strftime('%d %b %H:%M', $notification->date).' — '.$comment->RefUser->nick.' <a href="/'.$comment->parentType.'/'.$comment->parentId.'#comment'.$comment->id.'">ответил(-а)</a> на ваш комментарий.';
|
||||
}
|
||||
break;
|
||||
case Notifications::typePointLike:
|
||||
print strftime('%d %b %H:%M', $notification->date).' — <a href="/user/'.$notification->fromUserId.'">'.$notification->RefFromUser->nick.'</a> нравится ваша точка <a href="/point/'.$notification->objectId.'">'.$notification->RefPoint->name.'</a>.';
|
||||
|
|
|
|||
Loading…
Reference in New Issue