diff options
author | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-21 20:51:26 +0000 |
---|---|---|
committer | cash <cash@36083f99-b078-4883-b0ff-0f9b5a30f544> | 2010-08-21 20:51:26 +0000 |
commit | 64aafb5ca73d329663a93f80ac9cf3e68a082866 (patch) | |
tree | f6462c3112d26aea2ad09cdb76b38abb74183757 /engine/lib/relationships.php | |
parent | c3cbea030adb2201e29897915bfae19f1628c967 (diff) | |
download | elgg-64aafb5ca73d329663a93f80ac9cf3e68a082866.tar.gz elgg-64aafb5ca73d329663a93f80ac9cf3e68a082866.tar.bz2 |
Merged r6534-6559 from 1.7 branch to trunk
git-svn-id: http://code.elgg.org/elgg/trunk@6840 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/relationships.php')
-rw-r--r-- | engine/lib/relationships.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/engine/lib/relationships.php b/engine/lib/relationships.php index f813cacba..f1d119452 100644 --- a/engine/lib/relationships.php +++ b/engine/lib/relationships.php @@ -358,13 +358,16 @@ function add_entity_relationship($guid_one, $relationship, $guid_two) { $guid_one = (int)$guid_one; $relationship = sanitise_string($relationship); $guid_two = (int)$guid_two; + $time = time(); // Check for duplicates if (check_entity_relationship($guid_one, $relationship, $guid_two)) { return false; } - $result = insert_data("INSERT into {$CONFIG->dbprefix}entity_relationships (guid_one, relationship, guid_two) values ($guid_one, '$relationship', $guid_two)"); + $result = insert_data("INSERT into {$CONFIG->dbprefix}entity_relationships + (guid_one, relationship, guid_two, time_created) + values ($guid_one, '$relationship', $guid_two, $time)"); if ($result!==false) { $obj = get_relationship($result); |