aboutsummaryrefslogtreecommitdiff
path: root/engine/classes/ElggEntity.php
diff options
context:
space:
mode:
authorBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
committerBrett Profitt <brett.profitt@gmail.com>2011-06-18 19:56:33 -0400
commitec7b94a64aef23b85866ecdac8e8acc712d29bb6 (patch)
treea108205c3fa0b694d8ce0ebaafd259480d6b530a /engine/classes/ElggEntity.php
parentc80ba5aa03264dd64c20ed8ae222e87f9371a44d (diff)
parent2b68a4d217c35a5587c462620789493cf2804ba2 (diff)
downloadelgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.gz
elgg-ec7b94a64aef23b85866ecdac8e8acc712d29bb6.tar.bz2
Merge branch 'master' of github.com:Elgg/Elgg
Diffstat (limited to 'engine/classes/ElggEntity.php')
-rw-r--r--engine/classes/ElggEntity.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/engine/classes/ElggEntity.php b/engine/classes/ElggEntity.php
index 79b8c2a4e..8fc1e46cb 100644
--- a/engine/classes/ElggEntity.php
+++ b/engine/classes/ElggEntity.php
@@ -850,12 +850,11 @@ abstract class ElggEntity extends ElggData implements
* @since 1.8.0
*/
function countComments() {
- $type = $this->getType();
$params = array('entity' => $this);
- $number = elgg_trigger_plugin_hook('comments:count', $type, $params, false);
+ $num = trigger_plugin_hook('comments:count', $this->getType(), $params);
- if ($number) {
- return $number;
+ if (is_int($num)) {
+ return $num;
} else {
return $this->getAnnotationCalculation('generic_comment', 'count');
}