diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-04 18:54:23 -0400 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-04 18:54:23 -0400 |
commit | 4ee3cb4d754565cf7a327230f2ccae868f22a3e0 (patch) | |
tree | 4da7fc35c30bae7fa8b72434ce8819d02f5acca6 | |
parent | 7787debf3e536497952256df147ea84e520390e3 (diff) | |
download | elgg-4ee3cb4d754565cf7a327230f2ccae868f22a3e0.tar.gz elgg-4ee3cb4d754565cf7a327230f2ccae868f22a3e0.tar.bz2 |
Fixes #4058 updating a subtype if it already exists
-rw-r--r-- | engine/lib/entities.php | 2 |
1 files changed, 2 insertions, 0 deletions
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; |