aboutsummaryrefslogtreecommitdiffstats
path: root/Zotlabs
diff options
context:
space:
mode:
authorMario <mario@mariovavti.com>2021-12-15 12:58:33 +0000
committerMario <mario@mariovavti.com>2021-12-15 12:58:33 +0000
commitb1cf5d4e441c6e86525dd0c955bd617e7e492309 (patch)
tree46243c27daf8843d182133e9fc16e1d2be30f1df /Zotlabs
parentfe330ec1bb8da2371cf6afc57fbedc203248e3de (diff)
downloadvolse-hubzilla-b1cf5d4e441c6e86525dd0c955bd617e7e492309.tar.gz
volse-hubzilla-b1cf5d4e441c6e86525dd0c955bd617e7e492309.tar.bz2
volse-hubzilla-b1cf5d4e441c6e86525dd0c955bd617e7e492309.zip
nag channel owners to select achannel role if they have not yet done so yet
Diffstat (limited to 'Zotlabs')
-rw-r--r--Zotlabs/Module/Settings/Channel.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index 914523960..214dd505e 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -99,6 +99,11 @@ class Channel {
date_default_timezone_set($timezone);
}
+ if (!$role) {
+ notice(t('Please select a channel role') . EOL);
+ return;
+ }
+
if ($role !== get_pconfig(local_channel(), 'system', 'permissions_role')) {
$role_permissions = PermissionRoles::role_perms($_POST['permissions_role']);
@@ -200,12 +205,13 @@ class Channel {
if ($vnotify === false)
$vnotify = (-1);
+ $perm_roles = PermissionRoles::channel_roles();
$permissions_role = get_pconfig(local_channel(), 'system', 'permissions_role');
- if (!$permissions_role) {
- $permissions_role = 'custom';
- }
- $perm_roles = PermissionRoles::channel_roles();
+ if (!in_array($permissions_role, ['public', 'personal', 'group', 'custom'])) {
+ notice(t('Please select a channel role') . EOL);
+ array_unshift($perm_roles , '');
+ }
$plugin = ['basic' => '', 'notify' => ''];
call_hooks('channel_settings', $plugin);