From 4ee3cb4d754565cf7a327230f2ccae868f22a3e0 Mon Sep 17 00:00:00 2001 From: Cash Costello Date: Fri, 4 Nov 2011 18:54:23 -0400 Subject: Fixes #4058 updating a subtype if it already exists --- engine/lib/entities.php | 2 ++ 1 file changed, 2 insertions(+) (limited to 'engine/lib/entities.php') diff --git a/engine/lib/entities.php b/engine/lib/entities.php index 8b3431c8a..98e48641a 100644 --- a/engine/lib/entities.php +++ b/engine/lib/entities.php @@ -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; -- cgit v1.2.3