aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 16:52:56 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-14 16:52:56 +0000
commit41424c427d0c9639243ac93682366f280f23c5b0 (patch)
treee1cea5d413338ec19de6f90b896bc0902f4075e8 /engine/lib/annotations.php
parentcf860946249b508fd4e811b233ed618b3d21c8e7 (diff)
downloadelgg-41424c427d0c9639243ac93682366f280f23c5b0.tar.gz
elgg-41424c427d0c9639243ac93682366f280f23c5b0.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Get and set annotations seem to be working git-svn-id: https://code.elgg.org/elgg/trunk@229 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r--engine/lib/annotations.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 5c1fb35bf..5d0ba2215 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -171,7 +171,7 @@
{
global $CONFIG;
- $entity_guid = (int)$entity_id;
+ $entity_guid = (int)$entity_guid;
$name = sanitise_string(trim($name));
$value = sanitise_string(trim($value));
$value_type = detect_annotation_valuetype($value, sanitise_string(trim($value_type)));
@@ -238,7 +238,7 @@
* @param int $offset
* @param string $order_by
*/
- function get_annotations($entity_guid = 0, $entity_type = "", $entity_subtype = "", $name = "", $value = "", $owner_guid = 0, $limit = 10, $offset = 0,$order_by = "a.created desc")
+ function get_annotations($entity_guid = 0, $entity_type = "", $entity_subtype = "", $name = "", $value = "", $owner_guid = 0, $limit = 10, $offset = 0, $order_by = "a.time_created desc")
{
global $CONFIG;
@@ -250,13 +250,14 @@
$owner_guid = (int)$owner_guid;
$limit = (int)$limit;
$offset = (int)$offset;
+ $order_by = sanitise_string($order_by);
$access = get_access_list();
$where = array();
if ($entity_guid != 0)
- $where[] = "a.guid=$entity_guid";
+ $where[] = "a.entity_guid=$entity_guid";
if ($entity_type != "")
$where[] = "e.type='$entity_type'";