diff options
author | marijus <mario@mariovavti.com> | 2015-02-11 12:09:04 +0100 |
---|---|---|
committer | marijus <mario@mariovavti.com> | 2015-02-11 12:09:04 +0100 |
commit | b86ed864aa88ddb7e1792151ed59d3c6768752e8 (patch) | |
tree | 59d804af415dcce618fa17b4f8ce8756df9cdbdb /include/conversation.php | |
parent | 4d7b65c2349d8993abdcdae98e8f68a17882d0b8 (diff) | |
download | volse-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/conversation.php')
-rw-r--r-- | include/conversation.php | 11 |
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; } |