aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authorCash Costello <cash.costello@gmail.com>2011-11-04 18:54:23 -0400
committerCash Costello <cash.costello@gmail.com>2011-11-04 18:54:23 -0400
commit4ee3cb4d754565cf7a327230f2ccae868f22a3e0 (patch)
tree4da7fc35c30bae7fa8b72434ce8819d02f5acca6 /engine/lib
parent7787debf3e536497952256df147ea84e520390e3 (diff)
downloadelgg-4ee3cb4d754565cf7a327230f2ccae868f22a3e0.tar.gz
elgg-4ee3cb4d754565cf7a327230f2ccae868f22a3e0.tar.bz2
Fixes #4058 updating a subtype if it already exists
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php2
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;