mirror of
https://github.com/friendica/friendica
synced 2024-11-18 01:43:41 +00:00
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 = [];
|
$ret = [];
|
||||||
foreach ($response_verbs as $v) {
|
foreach ($response_verbs as $v) {
|
||||||
$ret[$v] = [];
|
$ret[$v] = [];
|
||||||
|
|
|
@ -1564,7 +1564,7 @@ function photos_content(App $a)
|
||||||
}
|
}
|
||||||
$response_verbs = ['like'];
|
$response_verbs = ['like'];
|
||||||
$response_verbs[] = 'dislike';
|
$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);
|
$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) {
|
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']) : '';
|
$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