X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=mod%2Fphotos.php;h=ab0ad75013c24f03678dc2e63730f2725b1cd48a;hb=3b23f89ca257f972aa9c7beffdd308b1fd1b37e6;hp=c7021aa44772b63b10151dfdcf40a9f392711ba0;hpb=6e71a840755c270fe144e638dbe17374f8f575f2;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index c7021aa447..ab0ad75013 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -9,6 +9,7 @@ use Friendica\Core\Config; use Friendica\Core\Worker; use Friendica\Database\DBM; use Friendica\Model\Contact; +use Friendica\Model\Group; use Friendica\Model\Photo; use Friendica\Network\Probe; use Friendica\Object\Image; @@ -1045,7 +1046,7 @@ function photos_content(App $a) } } if ($contact_id) { - $groups = init_groups_visitor($contact_id); + $groups = Group::getIdsByContactId($contact_id); $r = q("SELECT * FROM `contact` WHERE `blocked` = 0 AND `pending` = 0 AND `id` = %d AND `uid` = %d LIMIT 1", intval($contact_id), intval($owner_uid) @@ -1133,7 +1134,6 @@ function photos_content(App $a) '$uploadurl' => $ret['post_url'], // ACL permissions box - '$acl_data' => construct_acl_data($a, $a->user), // For non-Javascript ACL selector '$group_perms' => t('Show to Groups'), '$contact_perms' => t('Show to Contacts'), '$return_path' => $a->query_string, @@ -1481,7 +1481,6 @@ function photos_content(App $a) '$delete' => t('Delete Photo'), // ACL permissions box - '$acl_data' => construct_acl_data($a, $ph[0]), // For non-Javascript ACL selector '$group_perms' => t('Show to Groups'), '$contact_perms' => t('Show to Contacts'), '$return_path' => $a->query_string, @@ -1500,7 +1499,7 @@ function photos_content(App $a) $tpl = get_markup_template('photo_item.tpl'); $return_url = $a->cmd; - if ($can_post || can_write_wall($a, $owner_uid)) { + if ($can_post || can_write_wall($owner_uid)) { $like_tpl = get_markup_template('like_noshare.tpl'); $likebuttons = replace_macros($like_tpl, array( '$id' => $link_item['id'], @@ -1512,7 +1511,7 @@ function photos_content(App $a) } if (!DBM::is_result($r)) { - if (($can_post || can_write_wall($a, $owner_uid)) && $link_item['last-child']) { + if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) { $comments .= replace_macros($cmnt_tpl, array( '$return_path' => '', '$jsreload' => $return_url, @@ -1551,7 +1550,7 @@ function photos_content(App $a) $dislike = format_like($conv_responses['dislike'][$link_item['uri']], $conv_responses['dislike'][$link_item['uri'] . '-l'], 'dislike', $link_item['id']); } - if (($can_post || can_write_wall($a, $owner_uid)) && $link_item['last-child']) { + if (($can_post || can_write_wall($owner_uid)) && $link_item['last-child']) { $comments .= replace_macros($cmnt_tpl,array( '$return_path' => '', '$jsreload' => $return_url, @@ -1624,7 +1623,7 @@ function photos_content(App $a) '$comment' => $comment )); - if (($can_post || can_write_wall($a, $owner_uid)) && $item['last-child']) { + if (($can_post || can_write_wall($owner_uid)) && $item['last-child']) { $comments .= replace_macros($cmnt_tpl, array( '$return_path' => '', '$jsreload' => $return_url,