Improve get_responses() prototype

This commit is contained in:
Hypolite Petovan 2019-01-21 11:37:05 -05:00
parent ce177f22c8
commit b161bd1dfa
3 changed files with 3 additions and 3 deletions

View File

@ -1464,7 +1464,7 @@ function render_location_dummy(array $item) {
}
}
function get_responses(array $conv_responses, array $response_verbs, $ob, array $item) {
function get_responses(array $conv_responses, array $response_verbs, array $item, Post $ob = null) {
$ret = [];
foreach ($response_verbs as $v) {
$ret[$v] = [];

View File

@ -1564,7 +1564,7 @@ function photos_content(App $a)
}
$response_verbs = ['like'];
$response_verbs[] = 'dislike';
$responses = get_responses($conv_responses, $response_verbs, '', $link_item);
$responses = get_responses($conv_responses, $response_verbs, $link_item);
$paginate = $pager->renderFull($total);
}

View File

@ -250,7 +250,7 @@ class Post extends BaseObject
}
}
$responses = get_responses($conv_responses, $response_verbs, $this, $item);
$responses = get_responses($conv_responses, $response_verbs, $item, $this);
foreach ($response_verbs as $value => $verbs) {
$responses[$verbs]['output'] = !empty($conv_responses[$verbs][$item['uri']]) ? format_like($conv_responses[$verbs][$item['uri']], $conv_responses[$verbs][$item['uri'] . '-l'], $verbs, $item['uri']) : '';