diff options
author | Sem <sembrestels@riseup.net> | 2012-07-11 21:19:14 +0200 |
---|---|---|
committer | Sem <sembrestels@riseup.net> | 2012-07-11 21:19:14 +0200 |
commit | b83574ae1b8ada2bb9c2247492806473df920259 (patch) | |
tree | 30f9010da3cab12bda4921f079cfe86fcef2e7a4 /mod/likes/actions | |
parent | 46bd104bd523c08ff2f6bc0342be9ae1251259e8 (diff) | |
parent | 4d42fd0263948eee4a7c7a26ceca0647c01cce32 (diff) | |
download | elgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.gz elgg-b83574ae1b8ada2bb9c2247492806473df920259.tar.bz2 |
Merge tag '1.8.8' of git://github.com/Elgg/Elgg into lorea-preprod
Elgg 1.8.8 release
Conflicts:
js/lib/languages.js
Diffstat (limited to 'mod/likes/actions')
-rw-r--r-- | mod/likes/actions/likes/delete.php | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/mod/likes/actions/likes/delete.php b/mod/likes/actions/likes/delete.php index db3036bb4..88cb84467 100644 --- a/mod/likes/actions/likes/delete.php +++ b/mod/likes/actions/likes/delete.php @@ -4,17 +4,12 @@ * */ -$likes = elgg_get_annotations(array( - 'guid' => (int) get_input('guid'), - 'annotation_owner_guid' => elgg_get_logged_in_user_guid(), - 'annotation_name' => 'likes', -)); -if ($likes) { - if ($likes[0]->canEdit()) { - $likes[0]->delete(); - system_message(elgg_echo("likes:deleted")); - forward(REFERER); - } +$id = (int) get_input('id'); +$like = elgg_get_annotation_from_id($id); +if ($like && $like->canEdit()) { + $like->delete(); + system_message(elgg_echo("likes:deleted")); + forward(REFERER); } register_error(elgg_echo("likes:notdeleted")); |