aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/annotations.php
diff options
context:
space:
mode:
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']}))";