aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-19 11:27:40 +0000
committerben <ben@36083f99-b078-4883-b0ff-0f9b5a30f544>2009-01-19 11:27:40 +0000
commitbc962af8cc5631e1b1a3d6c79ffc1ca3696a4736 (patch)
treeb40eb9a26802eedb10be4647f021ae3be729724d
parent1b3a3a85d0ef5416fc6357a99525ca3477360967 (diff)
downloadelgg-bc962af8cc5631e1b1a3d6c79ffc1ca3696a4736.tar.gz
elgg-bc962af8cc5631e1b1a3d6c79ffc1ca3696a4736.tar.bz2
Fix for previous.
git-svn-id: https://code.elgg.org/elgg/trunk@2579 36083f99-b078-4883-b0ff-0f9b5a30f544
-rw-r--r--engine/lib/annotations.php9
1 files changed, 6 insertions, 3 deletions
diff --git a/engine/lib/annotations.php b/engine/lib/annotations.php
index 95dda4f40..674af14b1 100644
--- a/engine/lib/annotations.php
+++ b/engine/lib/annotations.php
@@ -616,7 +616,7 @@
* @param string $orderdir Default: asc - the sort order
* @return unknown
*/
- function __get_entities_from_annotations_calculate_x($sum = "sum", $entity_type = "", $entity_subtype = "", $name = "", $orderdir = 'desc')
+ function __get_entities_from_annotations_calculate_x($sum = "sum", $entity_type = "", $entity_subtype = "", $name = "", $owner_guid = 0, $orderdir = 'desc')
{
global $CONFIG;
@@ -624,6 +624,7 @@
$entity_type = sanitise_string($entity_type);
$entity_subtype = get_subtype_id($entity_type, $entity_subtype);
$name = get_metastring_id($name);
+ $owner_guid = (int) $owner_guid;
if (empty($name)) return 0;
@@ -631,6 +632,8 @@
if ($entity_type!="")
$where[] = "e.type='$entity_type'";
+ if ($owner_guid > 0)
+ $where[] = "e.container_guid = $owner_guid";
if ($entity_subtype)
$where[] = "e.subtype=$entity_subtype";
if ($name!="")
@@ -659,8 +662,8 @@
* @param unknown_type $owner_guid
* @return unknown
*/
- function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $value = "", $owner_guid = 0) {
- return __get_entities_from_annotations_calculate_x('sum',$entity_type,$entity_subtype,$name,$value);
+ function get_entities_from_annotation_count($entity_type = "", $entity_subtype = "", $name = "", $owner_guid = 0) {
+ return __get_entities_from_annotations_calculate_x('sum',$entity_type,$entity_subtype,$name,$owner_guid);
}
/**