aboutsummaryrefslogtreecommitdiff
path: root/views/default
diff options
context:
space:
mode:
authorbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:42:03 +0000
committerbrettp <brettp@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-03-25 21:42:03 +0000
commita93e7ca6eebfbedef5b311eac53854d785e5c82b (patch)
tree6c90f22dbae23304ee64ea16ca5d501515b77ede /views/default
parent586c6e88802c3ffa267c51cbef8a354e756b585d (diff)
downloadelgg-a93e7ca6eebfbedef5b311eac53854d785e5c82b.tar.gz
elgg-a93e7ca6eebfbedef5b311eac53854d785e5c82b.tar.bz2
Files missed from previous commit.
git-svn-id: http://code.elgg.org/elgg/trunk@5509 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'views/default')
-rw-r--r--views/default/likes/forms/edit.php16
1 files changed, 9 insertions, 7 deletions
diff --git a/views/default/likes/forms/edit.php b/views/default/likes/forms/edit.php
index 10bb7aada..76e503f55 100644
--- a/views/default/likes/forms/edit.php
+++ b/views/default/likes/forms/edit.php
@@ -8,20 +8,22 @@
*
* @uses $vars['entity']
*/
-
-if (isset($vars['entity']) && isloggedin()) {
+
+if (isset($vars['entity']) && isloggedin()) {
$guid = $vars['entity']->getGuid();
$url = elgg_add_action_tokens_to_url($vars['url'] . "action/likes/add?guid={$guid}");
//check to see if the user has already liked
- if(!elgg_already_created_annotation($guid, 'likes'))
- echo "<a href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a><br />";
+ if (!elgg_annotation_exists($guid, 'likes')) {
+ echo "<a href=\"{$url}\">" . elgg_echo('likes:likethis') . "</a><br />";
+ }
//display the number of likes
$numoflikes = elgg_count_likes($vars['entity']);
- if($numoflikes != 0){
- if($numoflikes == 1)
+ if ($numoflikes != 0) {
+ if ($numoflikes == 1) {
echo "<a onclick=\" $('#showLikes').show('slow');\">" . elgg_count_likes($vars['entity']) . " " . elgg_echo('likes:userlikedthis') . "</a>";
- else
+ } else {
echo "<a onclick=\" $('#showLikes').show('slow');\">" . elgg_count_likes($vars['entity']) . " " . elgg_echo('likes:userslikethis') . "</a>";
+ }
}
//show the users who liked the object
echo "<div id=\"showLikes\" style=\"display:none;\">";