aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Zotlabs/Module/Settings/Channel.php4
-rw-r--r--include/group.php8
-rwxr-xr-xview/tpl/settings.tpl3
3 files changed, 9 insertions, 6 deletions
diff --git a/Zotlabs/Module/Settings/Channel.php b/Zotlabs/Module/Settings/Channel.php
index 41e23b717..63370a141 100644
--- a/Zotlabs/Module/Settings/Channel.php
+++ b/Zotlabs/Module/Settings/Channel.php
@@ -148,6 +148,8 @@ class Channel {
$defpermcat = ((x($_POST,'defpermcat')) ? notags(trim($_POST['defpermcat'])) : 'default');
$cal_first_day = (((x($_POST,'first_day')) && (intval($_POST['first_day']) == 1)) ? 1: 0);
+ $mailhost = ((array_key_exists('mailhost',$_POST)) ? notags(trim($_POST['mailhost'])) : '');
+
$pageflags = $channel['channel_pageflags'];
$existing_adult = (($pageflags & PAGE_ADULT) ? 1 : 0);
@@ -239,6 +241,7 @@ class Channel {
set_pconfig(local_channel(),'system','attach_path',$attach_path);
set_pconfig(local_channel(),'system','cal_first_day',$cal_first_day);
set_pconfig(local_channel(),'system','default_permcat',$defpermcat);
+ set_pconfig(local_channel(),'system','email_notify_host',$mailhost);
$r = q("update channel set channel_name = '%s', channel_pageflags = %d, channel_timezone = '%s', channel_location = '%s', channel_notifyflags = %d, channel_max_anon_mail = %d, channel_max_friend_req = %d, channel_expire_days = %d $set_perms where channel_id = %d",
dbesc($username),
@@ -561,6 +564,7 @@ class Channel {
'$vnotify11' => array('vnotify11', t('System Registrations'), ($vnotify & VNOTIFY_REGISTER), VNOTIFY_REGISTER, '', $yes_no),
'$vnotify12' => array('vnotify12', t('Unseen shared files'), ($vnotify & VNOTIFY_FILES), VNOTIFY_FILES, '', $yes_no),
'$vnotify13' => ((get_config('system', 'disable_discover_tab') != 1) ? array('vnotify13', t('Unseen public activity'), ($vnotify & VNOTIFY_PUBS), VNOTIFY_PUBS, '', $yes_no) : array()),
+ '$mailhost' => [ 'mailhost', t('Email notification hub (hostname)'), get_pconfig(local_channel(),'system','email_notify_host',\App::get_hostname()), sprintf( t('If your channel is mirrored to multiple hubs, set this to your preferred location. This will prevent duplicate email notifications. Example: %s'),\App::get_hostname()) ],
'$always_show_in_notices' => array('always_show_in_notices', t('Also show new wall posts, private messages and connections under Notices'), $always_show_in_notices, 1, '', $yes_no),
'$evdays' => array('evdays', t('Notify me of events this many days in advance'), $evdays, t('Must be greater than 0')),
diff --git a/include/group.php b/include/group.php
index e0c20b536..03ebf7ee5 100644
--- a/include/group.php
+++ b/include/group.php
@@ -18,10 +18,6 @@ function group_add($uid,$name,$public = 0) {
intval($r)
);
if(($z) && $z[0]['deleted']) {
- /*$r = q("UPDATE groups SET deleted = 0 WHERE uid = %d AND gname = '%s'",
- intval($uid),
- dbesc($name)
- );*/
q('UPDATE groups SET deleted = 0 WHERE id = %d', intval($z[0]['id']));
notice( t('A deleted group with this name was revived. Existing item permissions <strong>may</strong> apply to this group and any future members. If this is not what you intended, please create another group with a different name.') . EOL);
}
@@ -81,11 +77,11 @@ function group_rmv($uid,$name) {
$user_info['channel_default_group'] = '';
$change = true;
}
- if(strpos($user_info['channel_allow_gid'], '<' . $group_id . '>') !== false) {
+ if(strpos($user_info['channel_allow_gid'], '<' . $group_hash . '>') !== false) {
$user_info['channel_allow_gid'] = str_replace('<' . $group_hash . '>', '', $user_info['channel_allow_gid']);
$change = true;
}
- if(strpos($user_info['channel_deny_gid'], '<' . $group_id . '>') !== false) {
+ if(strpos($user_info['channel_deny_gid'], '<' . $group_hash . '>') !== false) {
$user_info['channel_deny_gid'] = str_replace('<' . $group_hash . '>', '', $user_info['channel_deny_gid']);
$change = true;
}
diff --git a/view/tpl/settings.tpl b/view/tpl/settings.tpl
index 704d89bdd..33e0aa925 100755
--- a/view/tpl/settings.tpl
+++ b/view/tpl/settings.tpl
@@ -104,6 +104,9 @@
<div id="notification-settings-collapse" class="collapse" role="tabpanel" aria-labelledby="notification-settings">
<div class="section-content-tools-wrapper">
<div id="settings-notifications">
+
+ {{include file="field_input.tpl" field=$mailhost}}
+
<h3>{{$activity_options}}</h3>
<div class="group">
{{*not yet implemented *}}