aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
Diffstat (limited to 'actions')
-rw-r--r--actions/addtag.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/actions/addtag.php b/actions/addtag.php
index dc4274728..fb299dee6 100644
--- a/actions/addtag.php
+++ b/actions/addtag.php
@@ -25,6 +25,13 @@
forward($_SERVER['HTTP_REFERER']);
}
+ // test for empty tag
+ if ($user_id == 0 && empty($word)) {
+ register_error(elgg_echo("tidypics:phototagging:error"));
+ forward($_SERVER['HTTP_REFERER']);
+ }
+
+
$new_word_tag = false;
if ($user_id != 0) {
$relationships_type = 'user';
@@ -55,8 +62,6 @@
$image->tags = $tagarray;
}
- // test for empty tag
-
// create string for javascript tag object
$tag->coords = $coordinates_str;
$tag->type = $relationships_type;