aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-13 16:34:18 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-13 16:34:18 +0000
commitd0cee489037f5f3c1272458a7d28833774545ffe (patch)
treef0fb6cd427dc32be16dfd820426795b3f6503579 /engine/lib
parent5f3d2a8a257959e875e32c09f09126341b5b3254 (diff)
downloadelgg-d0cee489037f5f3c1272458a7d28833774545ffe.tar.gz
elgg-d0cee489037f5f3c1272458a7d28833774545ffe.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Fixed insert SQL git-svn-id: https://code.elgg.org/elgg/trunk@206 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/entities.php13
1 files changed, 5 insertions, 8 deletions
diff --git a/engine/lib/entities.php b/engine/lib/entities.php
index e5fe74b7f..83d04391f 100644
--- a/engine/lib/entities.php
+++ b/engine/lib/entities.php
@@ -42,8 +42,8 @@
$this->attributes['subtype'] = "";
$this->attributes['owner_guid'] = 0;
$this->attributes['access_id'] = 0;
- $this->attributes['time_created'] = time();
- $this->attributes['time_updated'] = time();
+ $this->attributes['time_created'] = "";
+ $this->attributes['time_updated'] = "";
}
/**
@@ -302,7 +302,7 @@
if ($result)
return $result->id;
- return false;
+ return 0;
}
/**
@@ -365,11 +365,8 @@
$owner_guid = (int)$owner_guid;
$access_id = (int)$access_id;
$time = time();
-
- if (!$subtype)
- throw new InvalidParameterException("Entity subtype '$subtype' is not supported");
-
- return insert_data("INSERT into {$CONFIG->dbprefix}entities (type,subtype,owner_guid,access_id,time_created,time_updated) values ('$type',$subtype, $owner_guid, $access_id, $time, $time)");
+
+ return insert_data("INSERT into {$CONFIG->dbprefix}entities (type, subtype, owner_guid, access_id, time_created, time_updated) values ('$type',$subtype, $owner_guid, $access_id, $time, $time)");
}
/**