Improve get_responses() prototype
This commit is contained in:
parent
ce177f22c8
commit
b161bd1dfa
3 changed files with 3 additions and 3 deletions
|
@ -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] = [];
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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']) : '';
|
||||
|
|
Loading…
Reference in a new issue