From 6984f98aed17217bcfbaf166414183ccd063e0ed Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Sat, 20 Jun 2009 13:53:48 +0000 Subject: catching empty tags now --- actions/addtag.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'actions') 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; -- cgit v1.2.3