]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
forgot to delete relationship created when tagging with users
authorCash Costello <cash.costello@gmail.com>
Thu, 18 Jun 2009 00:57:27 +0000 (00:57 +0000)
committerCash Costello <cash.costello@gmail.com>
Thu, 18 Jun 2009 00:57:27 +0000 (00:57 +0000)
actions/deletetag.php

index cd76b0a1d6158ef5049fd667440e5e619652b410..748d00380ab63cf1aab9e1d40b6ea51435da34c8 100644 (file)
@@ -7,7 +7,6 @@
        gatekeeper();\r
        action_gatekeeper();\r
 \r
-       //$user_id = get_input('user_id');\r
        $image_guid = get_input('image_guid');\r
        $tags = get_input('tags');\r
        \r
                        }\r
                }\r
                \r
+               // delete relationship if this tag is a user\r
+               $annotation = get_annotation($id);\r
+               $photo_tag = unserialize($annotation->value);\r
+               if ($photo_tag->type == 'user') {\r
+                       remove_entity_relationship($photo_tag->value, 'phototag', $image_guid);\r
+               }\r
+               \r
                // delete the photo tag annotation\r
                delete_annotation($id);\r
        }\r