From 3c083f6c4ff4d354a546e03477e7a4acbb16d4a9 Mon Sep 17 00:00:00 2001 From: cash Date: Wed, 29 Dec 2010 18:16:54 +0000 Subject: rewrote the display of likes git-svn-id: http://code.elgg.org/elgg/trunk@7748 36083f99-b078-4883-b0ff-0f9b5a30f544 --- actions/likes/add.php | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actions/likes/add.php') 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', -- cgit v1.2.3