aboutsummaryrefslogtreecommitdiff
path: root/engine/lib/metadata.php
diff options
context:
space:
mode:
authoricewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-07 21:26:28 +0000
committericewing <icewing@36083f99-b078-4883-b0ff-0f9b5a30f544>2008-03-07 21:26:28 +0000
commita264c11077564368210989da009e712e30a9d878 (patch)
tree189bbee4ba8cf33925e2b716d15e7a5e968d74b1 /engine/lib/metadata.php
parent9f5df450f0d84f2897915acaf2deedb4cbf81fd8 (diff)
downloadelgg-a264c11077564368210989da009e712e30a9d878.tar.gz
elgg-a264c11077564368210989da009e712e30a9d878.tar.bz2
Marcus Povey <marcus@dushka.co.uk>
* Add name and value to get_metadatas git-svn-id: https://code.elgg.org/elgg/trunk@114 36083f99-b078-4883-b0ff-0f9b5a30f544
Diffstat (limited to 'engine/lib/metadata.php')
-rw-r--r--engine/lib/metadata.php8
1 files changed, 7 insertions, 1 deletions
diff --git a/engine/lib/metadata.php b/engine/lib/metadata.php
index 777d3b58e..7718907cf 100644
--- a/engine/lib/metadata.php
+++ b/engine/lib/metadata.php
@@ -238,7 +238,7 @@
* @param int $offset
* @return array of ElggMetadata
*/
- function get_metadatas($object_id = 0, $object_type = "", $owner_id = 0, $order_by = "created desc", $limit = 10, $offset = 0)
+ function get_metadatas($object_id = 0, $object_type = "", $name = "", $value = "", $owner_id = 0, $order_by = "created desc", $limit = 10, $offset = 0)
{
global $CONFIG;
@@ -264,6 +264,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']}))";