aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authormarijus <mario@mariovavti.com>2015-02-11 12:09:04 +0100
committermarijus <mario@mariovavti.com>2015-02-11 12:09:04 +0100
commitb86ed864aa88ddb7e1792151ed59d3c6768752e8 (patch)
tree59d804af415dcce618fa17b4f8ce8756df9cdbdb /include
parent4d7b65c2349d8993abdcdae98e8f68a17882d0b8 (diff)
downloadvolse-hubzilla-b86ed864aa88ddb7e1792151ed59d3c6768752e8.tar.gz
volse-hubzilla-b86ed864aa88ddb7e1792151ed59d3c6768752e8.tar.bz2
volse-hubzilla-b86ed864aa88ddb7e1792151ed59d3c6768752e8.zip
to get the correct total count we should probably only count the arrays with count key set
Diffstat (limited to 'include')
-rw-r--r--include/conversation.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/conversation.php b/include/conversation.php
index 0af603ca9..3db8d7204 100644
--- a/include/conversation.php
+++ b/include/conversation.php
@@ -1666,8 +1666,17 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) {
$ret[$v]['button'] = get_response_button_text($v,$ret[$v]['count']);
$ret[$v]['title'] = $conv_responses[$v]['title'];
}
- $ret['count'] = count($ret);
+
+ $count = 0;
+ foreach($ret as $key) {
+ if ($key['count'] == true)
+ $count++;
+ }
+
+ $ret['count'] = $count;
+
//logger('ret: ' . print_r($ret,true));
+
return $ret;
}