aboutsummaryrefslogtreecommitdiff
path: root/engine/lib
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-06 11:57:04 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-06 11:57:04 +0000
commit26bf6e77aa959edce641ff1bc32475f0e76a950d (patch)
tree4f7d3c20a30c9a7864e921b8c036208bb7796d21 /engine/lib
parentdc6fe803e3ef44dc563e14f2bde2c5647b30d8bb (diff)
downloadelgg-26bf6e77aa959edce641ff1bc32475f0e76a950d.tar.gz
elgg-26bf6e77aa959edce641ff1bc32475f0e76a950d.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Cleared up typo git-svn-id: https://code.elgg.org/elgg/trunk@93 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib')
-rw-r--r--engine/lib/annotations.php8
-rw-r--r--engine/lib/metadata.php9
2 files changed, 13 insertions, 4 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 097bb24de..0e8df9c8a 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -212,13 +212,13 @@
$value_type = detect_annotation_valuetype($value, sanitise_string(trim($value_type)));
$owner_id = (int)$owner_id;
- if ($owner_id=0) $owner_id = $_SESSION['id'];
+ if ($owner_id==0) $owner_id = $_SESSION['id'];
$access_id = (int)$access_id;
+ $time = time();
-
- return insert_data("INSERT into {$CONFIG->dbprefix}annotations (object_id, object_type, name, value, value_type, owner_id, created, access_id) VALUES ($object_id,'$object_type','$name','$value','$value_type', $owner_id, $access_id)");
+ return insert_data("INSERT into {$CONFIG->dbprefix}annotations (object_id, object_type, name, value, value_type, owner_id, created, access_id) VALUES ($object_id,'$object_type','$name','$value','$value_type', $owner_id, $time, $access_id)");
}
/**
@@ -241,7 +241,7 @@
$value_type = detect_annotation_valuetype($value, sanitise_string(trim($value_type)));
$owner_id = (int)$owner_id;
- if ($owner_id=0) $owner_id = $_SESSION['id'];
+ if ($owner_id==0) $owner_id = $_SESSION['id'];
$access_id = (int)$access_id;
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index ed2d2f0d0..b36e9ac44 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -122,7 +122,10 @@
$name = sanitise_string(trim($name));
$value = sanitise_string(trim($value));
$value_type = sanitise_string(trim($value_type));
+
$owner_id = (int)$owner_id;
+ if ($owner_id==0) $owner_id = $_SESSION['id'];
+
$access_id = (int)$access_id;
return insert_data("INSERT into {$CONFIG->dbprefix}metadata (object_id, object_type, name, value, value_type, owner_id, created, access_id) VALUES ($object_id,'$object_type','$name','$value','$value_type', $owner_id, $access_id)");
@@ -146,7 +149,10 @@
$name = sanitise_string(trim($name));
$value = sanitise_string(trim($value));
$value_type = sanitise_string(trim($value_type));
+
$owner_id = (int)$owner_id;
+ if ($owner_id==0) $owner_id = $_SESSION['id'];
+
$access_id = (int)$access_id;
$access = get_access_list();
@@ -188,7 +194,10 @@
$object_type = sanitise_string(trim($object_type));
$name = sanitise_string(trim($name));
$value = sanitise_string(trim($value));
+
$owner_id = (int)$owner_id;
+ if ($owner_id==0) $owner_id = $_SESSION['id'];
+
$limit = (int)$limit;
$offset = (int)$offset;