Comstants for features

This commit is contained in:
Michael 2024-03-24 13:42:48 +00:00
parent d824bb536f
commit c041c65c1d
20 changed files with 273 additions and 274 deletions

View file

@ -240,7 +240,7 @@ class Photos extends \Friendica\Module\BaseProfile
// Create item container
$lat = $lon = null;
if (!empty($exif['GPS']) && Feature::isEnabled($this->owner['uid'], 'photo_location')) {
if (!empty($exif['GPS']) && Feature::isEnabled($this->owner['uid'], Feature::PHOTO_LOCATION)) {
$lat = Photo::getGps($exif['GPS']['GPSLatitude'], $exif['GPS']['GPSLatitudeRef']);
$lon = Photo::getGps($exif['GPS']['GPSLongitude'], $exif['GPS']['GPSLongitudeRef']);
}

View file

@ -166,7 +166,7 @@ class Profile extends BaseProfile
$basic_fields += self::buildField('fullname', $this->t('Full Name:'), $profile['name']);
if (Feature::isEnabled($profile['uid'], 'profile_membersince')) {
if (Feature::isEnabled($profile['uid'], Feature::MEMBER_SINCE)) {
$basic_fields += self::buildField(
'membersince',
$this->t('Member since:'),
@ -255,7 +255,7 @@ class Profile extends BaseProfile
}
//show subscribed group if it is enabled in the usersettings
if (Feature::isEnabled($profile['uid'], 'forumlist_profile')) {
if (Feature::isEnabled($profile['uid'], Feature::GROUPS)) {
$custom_fields += self::buildField(
'group_list',
$this->t('Groups:'),