aboutsummaryrefslogtreecommitdiff
path: root/mod/likes/views/default
diff options
context:
space:
mode:
authorEvan Winslow <evan@elgg.org>2012-07-21 15:23:42 -0700
committerEvan Winslow <evan@elgg.org>2012-07-21 15:23:42 -0700
commit3cb2ce976fc024dfc700ef4500e5cddd01163e9c (patch)
treeedb4a9320d7d499b66832cfa5cf1a5548cad80fb /mod/likes/views/default
parentb164c39ac5c82b311e9ef07fa01fcc464bab86b1 (diff)
downloadelgg-3cb2ce976fc024dfc700ef4500e5cddd01163e9c.tar.gz
elgg-3cb2ce976fc024dfc700ef4500e5cddd01163e9c.tar.bz2
Revert "Fixes #4606 made unlike code consistent and functional"
This reverts commit e3222535a07e39ffe506eb9688db515798ebf2a4.
Diffstat (limited to 'mod/likes/views/default')
-rw-r--r--mod/likes/views/default/annotation/likes.php4
-rw-r--r--mod/likes/views/default/likes/button.php8
2 files changed, 3 insertions, 9 deletions
diff --git a/mod/likes/views/default/annotation/likes.php b/mod/likes/views/default/annotation/likes.php
index abd4df823..d41522fc4 100644
--- a/mod/likes/views/default/annotation/likes.php
+++ b/mod/likes/views/default/annotation/likes.php
@@ -29,9 +29,9 @@ $friendlytime = elgg_view_friendly_time($like->time_created);
if ($like->canEdit()) {
$delete_button = elgg_view("output/confirmlink",array(
- 'href' => "action/likes/delete?id={$like->id}",
+ 'href' => "action/likes/delete?annotation_id={$like->id}",
'text' => "<span class=\"elgg-icon elgg-icon-delete float-alt\"></span>",
- 'confirm' => elgg_echo('likes:delete:confirm'),
+ 'confirm' => elgg_echo('deleteconfirm'),
'encode_text' => false,
));
}
diff --git a/mod/likes/views/default/likes/button.php b/mod/likes/views/default/likes/button.php
index 956bbcb19..bc7c8fd8a 100644
--- a/mod/likes/views/default/likes/button.php
+++ b/mod/likes/views/default/likes/button.php
@@ -24,13 +24,7 @@ if (elgg_is_logged_in() && $vars['entity']->canAnnotate(0, 'likes')) {
);
$likes_button = elgg_view('output/url', $params);
} else {
- $like = elgg_get_annotations(array(
- 'guid' => $guid,
- 'annotation_owner_guid' => elgg_get_logged_in_user_guid(),
- 'annotation_name' => 'likes',
- ));
- $like = $like[0];
- $url = elgg_get_site_url() . "action/likes/delete?id={$like->id}";
+ $url = elgg_get_site_url() . "action/likes/delete?guid={$guid}";
$params = array(
'href' => $url,
'text' => elgg_view_icon('thumbs-up-alt'),