to get the correct total count we should probably only count the arrays with count key set

This commit is contained in:
marijus 2015-02-11 12:09:04 +01:00
parent 4d7b65c234
commit b86ed864aa

View File

@ -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;
}