|
@@ 47-53 (lines=7) @@
|
| 44 |
|
$comment = $this->di->get("comment"); |
| 45 |
|
$comment->getComment($index); |
| 46 |
|
|
| 47 |
|
if ($comment->userId !== $this->di->get("session")->get("user")) { |
| 48 |
|
if ($user->isUserAdmin()) { |
| 49 |
|
// Do nothing |
| 50 |
|
} else { |
| 51 |
|
$this->di->get("response")->redirect($this->di->get("url")->create("comment")); |
| 52 |
|
} |
| 53 |
|
} |
| 54 |
|
|
| 55 |
|
$comment->deleteComment($index); |
| 56 |
|
$this->di->get("response")->redirect($this->di->get("url")->create("comment")); |
|
@@ 68-74 (lines=7) @@
|
| 65 |
|
$user = $this->di->get("umodel"); |
| 66 |
|
|
| 67 |
|
|
| 68 |
|
if ($comment->userId !== $this->di->get("session")->get("user")) { |
| 69 |
|
if ($user->isUserAdmin()) { |
| 70 |
|
// Do nothing |
| 71 |
|
} else { |
| 72 |
|
$this->di->get("response")->redirect($this->di->get("url")->create("comment")); |
| 73 |
|
} |
| 74 |
|
} |
| 75 |
|
|
| 76 |
|
$form = new EditCommentForm($this->di, $comment); |
| 77 |
|
$form->check(); |