X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=inline;f=mod%2Fphotos.php;h=c8dad750d1528b95f9231b7eb0d69706b76c9ffa;hb=76fdf5c910e8cd887f6f7b83559f4c81c88f507d;hp=9515d17953c1c24511d7320b692e5f83d1e5a751;hpb=85c8bf022841fb53a42e012d2e90dd23f56df2ab;p=friendica.git diff --git a/mod/photos.php b/mod/photos.php index 9515d17953..c8dad750d1 100644 --- a/mod/photos.php +++ b/mod/photos.php @@ -6,6 +6,8 @@ use Friendica\App; use Friendica\Content\Feature; use Friendica\Content\Nav; +use Friendica\Content\Text\BBCode; +use Friendica\Core\ACL; use Friendica\Core\Addon; use Friendica\Core\Config; use Friendica\Core\L10n; @@ -17,7 +19,6 @@ use Friendica\Model\Group; use Friendica\Model\Item; use Friendica\Model\Photo; use Friendica\Model\Profile; -use Friendica\Model\Term; use Friendica\Network\Probe; use Friendica\Object\Image; use Friendica\Protocol\DFRN; @@ -26,8 +27,6 @@ use Friendica\Util\Map; use Friendica\Util\Temporal; require_once 'include/items.php'; -require_once 'include/acl_selectors.php'; -require_once 'include/bbcode.php'; require_once 'include/security.php'; function photos_init(App $a) { @@ -839,7 +838,7 @@ function photos_post(App $a) $smallest = 0; - $photo_hash = photo_new_resource(); + $photo_hash = Photo::newResource(); $r = Photo::store($Image, $page_owner_uid, $visitor, $photo_hash, $filename, $album, 0 , 0, $str_contact_allow, $str_group_allow, $str_contact_deny, $str_group_deny); @@ -865,7 +864,7 @@ function photos_post(App $a) // Create item container $lat = $lon = null; - if ($exif && $exif['GPS'] && Feature::isEnabled($channel_id, 'photo_location')) { + if ($exif && $exif['GPS'] && Feature::isEnabled($page_owner_uid, 'photo_location')) { $lat = Photo::getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']); $lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']); } @@ -934,7 +933,6 @@ function photos_content(App $a) return; } - require_once 'include/bbcode.php'; require_once 'include/security.php'; require_once 'include/conversation.php'; @@ -1086,7 +1084,7 @@ function photos_content(App $a) $tpl = get_markup_template('photos_upload.tpl'); - $aclselect_e = ($visitor ? '' : populate_acl($a->user)); + $aclselect_e = ($visitor ? '' : ACL::getFullSelectorHTML($a->user)); $o .= replace_macros($tpl,[ '$pagename' => L10n::t('Upload Photos'), @@ -1411,7 +1409,7 @@ function photos_content(App $a) if (strlen($tag_str)) { $tag_str .= ', '; } - $tag_str .= bbcode($t); + $tag_str .= BBCode::convert($t); } $tags = [L10n::t('Tags: '), $tag_str]; if ($cmd === 'edit') { @@ -1427,7 +1425,7 @@ function photos_content(App $a) $album_e = $ph[0]['album']; $caption_e = $ph[0]['desc']; - $aclselect_e = populate_acl($ph[0]); + $aclselect_e = ACL::getFullSelectorHTML($ph[0]); $edit = replace_macros($edit_tpl, [ '$id' => $ph[0]['id'], @@ -1574,7 +1572,7 @@ function photos_content(App $a) $name_e = $profile_name; $title_e = $item['title']; - $body_e = bbcode($item['body']); + $body_e = BBCode::convert($item['body']); $comments .= replace_macros($template,[ '$id' => $item['item_id'],