aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-06 17:50:28 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-06 17:50:28 +0000
commit4318e9697253546e8bb4f76166ac92ee6918e94e (patch)
treee4c2f40030d93781109e21f56101af58e8c8482b /engine/lib/annotations.php
parentf411bafa56c557a28f37d6b392579bc05c12ab62 (diff)
downloadelgg-4318e9697253546e8bb4f76166ac92ee6918e94e.tar.gz
elgg-4318e9697253546e8bb4f76166ac92ee6918e94e.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Added delete annotations, fixed error on annotation search (missing params) git-svn-id: https://code.elgg.org/elgg/trunk@105 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/annotations.php')
-rw-r--r--engine/lib/annotations.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index c02ad10fa..d795f590d 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -136,12 +136,14 @@
*
* @param int $object_id
* @param string $object_type
+ * @param string $name
+ * @param mixed $value
* @param int $owner_id
* @param string $order_by
* @param int $limit
* @param int $offset
*/
- function get_annotations($object_id = 0, $object_type = "", $owner_id = 0, $order_by = "created desc", $limit = 10, $offset = 0)
+ function get_annotations($object_id = 0, $object_type = "", $name = "", $value = "", $owner_id = 0, $order_by = "created desc", $limit = 10, $offset = 0)
{
global $CONFIG;
@@ -168,6 +170,12 @@
if ($owner_id != 0)
$where[] = "owner_id=$owner_id";
+ if ($name != "")
+ $where[] = "name='$name'";
+
+ if ($value != "")
+ $where[] = "value='$value'";
+
// add access controls
$access = get_access_list();
$where[] = "(access_id in {$access} or (access_id = 0 and owner_id = {$_SESSION['id']}))";