]> gitweb.fluxo.info Git - lorea/elgg.git/commitdiff
Fixes #4058 updating a subtype if it already exists
authorCash Costello <cash.costello@gmail.com>
Fri, 4 Nov 2011 22:54:23 +0000 (18:54 -0400)
committerCash Costello <cash.costello@gmail.com>
Fri, 4 Nov 2011 22:54:23 +0000 (18:54 -0400)
engine/lib/entities.php

index 8b3431c8a293f646077c2dd491ab3d67c086e2d6..98e48641a1a6dfa4e485de4e8327b2146a5595db 100644 (file)
@@ -306,6 +306,8 @@ function add_subtype($type, $subtype, $class = "") {
        if ($id == 0) {
                return insert_data("insert into {$CONFIG->dbprefix}entity_subtypes"
                        . " (type, subtype, class) values ('$type','$subtype','$class')");
+       } else {
+               update_subtype($type, $subtype, $class);
        }
 
        return $id;