Skip to content

Commit

Permalink
Fixed pic url in Notification creation
Browse files Browse the repository at this point in the history
  • Loading branch information
micheleangioni committed Feb 2, 2016
1 parent 004089e commit 1a11f50
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function onPostCreate(PostEventInterface $event)
}
else {
$picUrl = $this->getCategoryPicUrl($post);
$text = substr($post->getText(), 0, min(strlen($post->getText()), config('ma_messageboard.notification_max_length')));
$text = substr($post->getText(), 0, min(strlen($post->getText()), config('ma_messageboard.notifications.notification_max_length')));
}

$this->notificationService->sendNotification(
Expand Down Expand Up @@ -67,7 +67,7 @@ public function onCommentCreate(CommentEventInterface $event)
}
else {
$picUrl = '';
$text = substr($comment->getText(), 0, min(strlen($comment->getText()), config('ma_messageboard.notification_max_length')));
$text = substr($comment->getText(), 0, min(strlen($comment->getText()), config('ma_messageboard.notifications.notification_max_length')));
}

$this->notificationService->sendNotification(
Expand Down Expand Up @@ -160,8 +160,8 @@ public function onLikeCreate(LikeEventInterface $event)
*/
protected function getUserPicPath(MbUserWithImageInterface $user)
{
if(config('ma_messageboard.use_model_pic')) {
$picPath = config('ma_messageboard.user_pic_path') . DIRECTORY_SEPARATOR . $user->getProfileImageFilename();
if(config('ma_messageboard.notifications.use_model_pic')) {
$picPath = config('ma_messageboard.notifications.user_pic_path') . DIRECTORY_SEPARATOR . $user->getProfileImageFilename();
}
else {
$picPath = '';
Expand All @@ -183,7 +183,7 @@ protected function getCategoryPicUrl(Post $post)
return '';
}

return config('ma_messageboard.category_pic_path') . DIRECTORY_SEPARATOR . $post->category->getDefaultPic();
return config('ma_messageboard.notifications.category_pic_path') . DIRECTORY_SEPARATOR . $post->category->getDefaultPic();
}

/**
Expand Down

0 comments on commit 1a11f50

Please sign in to comment.