aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 14:46:13 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-04-21 14:46:13 +0000
commitd3f088807f5b85186bdee00a3d192a4def9c86a2 (patch)
treefe5b271da00e4d367c87de166dba800fde08b717 /engine/lib
parent4cbae2be2e063b5835a6edef5d9a0c036c09b4d4 (diff)
downloadelgg-d3f088807f5b85186bdee00a3d192a4def9c86a2.tar.gz
elgg-d3f088807f5b85186bdee00a3d192a4def9c86a2.tar.bz2
git-svn-id: https://code.elgg.org/elgg/trunk@504 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-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')");