aboutsummaryrefslogtreecommitdiff
path: root/actions
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2009-06-20 13:53:48 +0000
committerCash Costello <cash.costello@gmail.com>2009-06-20 13:53:48 +0000
commit6984f98aed17217bcfbaf166414183ccd063e0ed (patch)
treed8a600bbd740c1b8f2912c97bacf6d56586ab92b /actions
parentf99dc54a39dd6754057fcaa11d19028316e60598 (diff)
downloadelgg-6984f98aed17217bcfbaf166414183ccd063e0ed.tar.gz
elgg-6984f98aed17217bcfbaf166414183ccd063e0ed.tar.bz2
catching empty tags now
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;