aboutsummaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rw-r--r--engine/lib/entities.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index febdea6aa..00ee54663 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -513,8 +513,9 @@
$type = sanitise_string($type);
$subtype = sanitise_string($subtype);
-
+
$result = get_data_row("SELECT * from {$CONFIG->dbprefix}entity_subtypes where type='$type' and subtype='$subtype'");
+
if ($result)
return $result->id;
@@ -582,7 +583,7 @@
return 0;
$id = get_subtype_id($type, $subtype);
-
+
if (!$id)
return insert_data("insert into {$CONFIG->dbprefix}entity_subtypes (type, subtype, class) values ('$type','$subtype','$class')");