@@ -92,9 +92,11 @@ |
||
92 | 92 | $commentId = $this->commentModel->addComment($postId, $userId, $comment, $admin); |
93 | 93 | |
94 | 94 | |
95 | - if (!$admin) //if we are not an admin, send an email to alert and add an alertBox |
|
95 | + if (!$admin) { |
|
96 | + //if we are not an admin, send an email to alert and add an alertBox |
|
96 | 97 | { |
97 | 98 | $siteConfig = $this->siteConfig->getSiteConfig(); |
99 | + } |
|
98 | 100 | $post = $this->postModel->getSinglePost($postId); |
99 | 101 | |
100 | 102 | $emailMessage = "<h1>New comment on post " . $post->title . "</a></h1>"; |
@@ -282,9 +282,11 @@ |
||
282 | 282 | //all set, redirect and set message |
283 | 283 | $redirectUrl = ""; |
284 | 284 | $refererUrl = $this->request->getReferer(); |
285 | - if ($refererUrl != "")//getReferer can return null if client isn't configured |
|
285 | + if ($refererUrl != "") { |
|
286 | + //getReferer can return null if client isn't configured |
|
286 | 287 | { |
287 | 288 | $baseUrl = $this->request->getBaseUrl(); |
289 | + } |
|
288 | 290 | $redirectUrl = $this->removeFromBeginning($refererUrl, $baseUrl); |
289 | 291 | } |
290 | 292 |