@@ -91,9 +91,11 @@ |
||
91 | 91 | $admin = $this->session->get('user_role_level') >= Constant::ADMIN_LEVEL; |
92 | 92 | $commentId = $this->commentModel->addComment($postId, $userId, $comment, $admin); |
93 | 93 | |
94 | - if (!$admin) //if we are not an admin, send an email to alert and add an alertBox |
|
94 | + if (!$admin) { |
|
95 | + //if we are not an admin, send an email to alert and add an alertBox |
|
95 | 96 | { |
96 | 97 | $siteConfig = $this->siteConfig->getSiteConfig(); |
98 | + } |
|
97 | 99 | $post = $this->postModel->getSinglePost($postId); |
98 | 100 | $baseUrl = $this->request->getBaseUrl(); |
99 | 101 |
@@ -121,10 +121,12 @@ |
||
121 | 121 | } |
122 | 122 | |
123 | 123 | $refererUrl = $this->request->getReferer(); |
124 | - if($refererUrl === "") //referer can return null, set default |
|
124 | + if($refererUrl === "") { |
|
125 | + //referer can return null, set default |
|
125 | 126 | { |
126 | 127 | $refererUrl = "admin/comments/view-comments"; |
127 | 128 | } |
129 | + } |
|
128 | 130 | $baseUrl = $this->request->getBaseUrl(); |
129 | 131 | $redirectUrl = $this->removeFromBeginning($refererUrl, $baseUrl); |
130 | 132 |