Browse Source

Improve get_responses() prototype

pull/6483/head
Hypolite Petovan 2 years ago
parent
commit
b161bd1dfa
3 changed files with 3 additions and 3 deletions
  1. +1
    -1
      include/conversation.php
  2. +1
    -1
      mod/photos.php
  3. +1
    -1
      src/Object/Post.php

+ 1
- 1
include/conversation.php 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] = [];


+ 1
- 1
mod/photos.php 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);
}


+ 1
- 1
src/Object/Post.php 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']) : '';


Loading…
Cancel
Save