X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fphotos.php;h=55c8881e4cecd17d74d278fbc2e75dd8bb4d817d;hb=f10481796778811d3ea4fab803508be3ffde84e4;hp=259209ed4041ede16cf179b0c688030eaf10d4a8;hpb=b83393070270814a0a943939750b3a2c5564c7cb;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 259209ed40..55c8881e4c 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -26,9 +26,9 @@ use Friendica\Protocol\DFRN; use Friendica\Util\DateTimeFormat; use Friendica\Util\Map; use Friendica\Util\Temporal; +use Friendica\Util\Security; require_once 'include/items.php'; -require_once 'include/security.php'; function photos_init(App $a) { @@ -948,7 +948,6 @@ function photos_content(App $a) return; } - require_once 'include/security.php'; require_once 'include/conversation.php'; if (empty($a->data['user'])) { @@ -1053,7 +1052,7 @@ function photos_content(App $a) return; } - $sql_extra = permissions_sql($owner_uid, $remote_contact, $groups); + $sql_extra = Security::getPermissionsSQLByUserId($owner_uid, $remote_contact, $groups); $o = ""; @@ -1473,7 +1472,7 @@ function photos_content(App $a) $tpl = get_markup_template('photo_item.tpl'); $return_url = $a->cmd; - if ($can_post || can_write_wall($owner_uid)) { + if ($can_post || Security::canWriteToUserWall($owner_uid)) { $like_tpl = get_markup_template('like_noshare.tpl'); $likebuttons = replace_macros($like_tpl, [ '$id' => $link_item['id'], @@ -1485,7 +1484,7 @@ function photos_content(App $a) } if (!DBA::isResult($items)) { - if (($can_post || can_write_wall($owner_uid))) { + if (($can_post || Security::canWriteToUserWall($owner_uid))) { $comments .= replace_macros($cmnt_tpl, [ '$return_path' => '', '$jsreload' => $return_url, @@ -1524,7 +1523,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($owner_uid))) { + if (($can_post || Security::canWriteToUserWall($owner_uid))) { $comments .= replace_macros($cmnt_tpl,[ '$return_path' => '', '$jsreload' => $return_url, @@ -1584,7 +1583,7 @@ function photos_content(App $a) '$comment' => $comment ]); - if (($can_post || can_write_wall($owner_uid))) { + if (($can_post || Security::canWriteToUserWall($owner_uid))) { $comments .= replace_macros($cmnt_tpl, [ '$return_path' => '', '$jsreload' => $return_url,