aboutsummaryrefslogtreecommitdiff
path: root/actions/likes/add.php
diff options
context:
space:
mode:
authorcash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:16:54 +0000
committercash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544>2010-12-29 18:16:54 +0000
commit3c083f6c4ff4d354a546e03477e7a4acbb16d4a9 (patch)
tree961ad1135905070b95a51bc0c6bdbd948754b562 /actions/likes/add.php
parent298114995174acf451cc1477fdeec34a42ef608b (diff)
downloadelgg-3c083f6c4ff4d354a546e03477e7a4acbb16d4a9.tar.gz
elgg-3c083f6c4ff4d354a546e03477e7a4acbb16d4a9.tar.bz2
rewrote the display of likes
git-svn-id: http://code.elgg.org/elgg/trunk@7748 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'actions/likes/add.php')
-rw-r--r--actions/likes/add.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/actions/likes/add.php b/actions/likes/add.php
index 3de1ebc51..9abe0b60e 100644
--- a/actions/likes/add.php
+++ b/actions/likes/add.php
@@ -20,6 +20,12 @@ if (!$entity) {
forward(REFERER);
}
+// cannot like your own stuff
+if (get_loggedin_userid() == $entity->getOwnerGUID()) {
+ register_error(elgg_echo("likes:no_self_like"));
+ forward(REFERER);
+}
+
$user = get_loggedin_user();
$annotation = create_annotation($entity->guid,
'likes',