Changeset aceef6b770c0bfb28fc0e578896baf5396c4e0ec
- Timestamp:
- 10/30/11 20:49:53 (7 months ago)
- Author:
- Xemle <xemle@phtagr.org>
- Children:
- 1df3dc9322b501cf7a75e0467e61a61edbf8673c
- Parents:
- 249034c699b90367da71a5bc88d2b8fc981dd77d
- git-committer:
- Xemle <xemle@phtagr.org> / 2011-10-30T20:49:53Z+0100
- Message:
-
Fix comment deletion
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r0bfc2c5
|
raceef6b
|
|
| 232 | 232 | // Allow only comment owner, media owner or admins |
| 233 | 233 | if ((isset($comment['User']['id']) && $comment['User']['id'] == $userId) || ($comment['Media']['user_id'] == $userId) || ($this->getUserRole() == ROLE_ADMIN)) { |
| 234 | | if ($this->Comment->del($id)) { |
| | 234 | if ($this->Comment->delete($id)) { |
| 235 | 235 | $this->Session->setFlash(__('Comment deleted', true)); |
| 236 | 236 | Logger::info("Delete comment {$comment['Comment']['id']} of media {$comment['Media']['id']}"); |