From: Cash Costello Date: Fri, 4 Nov 2011 22:54:23 +0000 (-0400) Subject: Fixes #4058 updating a subtype if it already exists X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4ee3cb4d754565cf7a327230f2ccae868f22a3e0;p=lorea%2Felgg.git Fixes #4058 updating a subtype if it already exists --- 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;