]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
catching empty tags now
authorCash Costello <cash.costello@gmail.com>
Sat, 20 Jun 2009 13:53:48 +0000 (13:53 +0000)
committerCash Costello <cash.costello@gmail.com>
Sat, 20 Jun 2009 13:53:48 +0000 (13:53 +0000)
actions/addtag.php

index dc4274728ef572b15f143ba4ee78ca78d9843be6..fb299dee681fd74e3134469cebb3e88457c4401b 100644 (file)
                forward($_SERVER['HTTP_REFERER']);\r
        }\r
 \r
+       // test for empty tag\r
+       if ($user_id == 0 && empty($word)) {\r
+               register_error(elgg_echo("tidypics:phototagging:error"));\r
+               forward($_SERVER['HTTP_REFERER']);\r
+       }\r
+\r
+\r
        $new_word_tag = false;\r
        if ($user_id != 0) {\r
                $relationships_type = 'user';\r
@@ -55,8 +62,6 @@
                $image->tags = $tagarray;\r
        }\r
 \r
-       // test for empty tag\r
-\r
        // create string for javascript tag object\r
        $tag->coords = $coordinates_str;\r
        $tag->type   = $relationships_type;\r