return;
}
- $user = User::getById($a->getUserId());
+ $user = User::getById($a->getLoggedInUserId());
if ((DI::args()->getArgc() > 1) && (DI::args()->getArgv()[1] == 'connectors')) {
BaseModule::checkFormSecurityTokenRedirectOnError('/settings/connectors', 'settings_connectors');
$mail_replyto = $_POST['mail_replyto'] ?? '';
$mail_pubmail = $_POST['mail_pubmail'] ?? '';
- if (
- !DI::config()->get('system', 'dfrn_only')
- && function_exists('imap_open')
- && !DI::config()->get('system', 'imap_disabled')
- ) {
+ if (function_exists('imap_open') && !DI::config()->get('system', 'imap_disabled')) {
$failed = false;
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
intval(local_user())
$unlisted = (($_POST['unlisted'] == 1) ? 1: 0);
$accessiblephotos = (($_POST['accessible-photos'] == 1) ? 1: 0);
+ $notify_like = (($_POST['notify_like'] == 1) ? 1 : 0);
+ $notify_announce = (($_POST['notify_announce'] == 1) ? 1 : 0);
+
$email_textonly = (($_POST['email_textonly'] == 1) ? 1 : 0);
$detailed_notif = (($_POST['detailed_notif'] == 1) ? 1 : 0);
DI::pConfig()->set(local_user(), 'expire', 'photos', $expire_photos);
DI::pConfig()->set(local_user(), 'expire', 'network_only', $expire_network_only);
+ DI::pConfig()->set(local_user(), 'system', 'notify_like', $notify_like);
+ DI::pConfig()->set(local_user(), 'system', 'notify_announce', $notify_announce);
+
DI::pConfig()->set(local_user(), 'system', 'email_textonly', $email_textonly);
DI::pConfig()->set(local_user(), 'system', 'detailed_notif', $detailed_notif);
DI::pConfig()->set(local_user(), 'system', 'notify_ignored', $notify_ignored);
}
$mail_disabled = ((function_exists('imap_open') && (!DI::config()->get('system', 'imap_disabled'))) ? 0 : 1);
- if (DI::config()->get('system', 'dfrn_only')) {
- $mail_disabled = 1;
- }
if (!$mail_disabled) {
$r = q("SELECT * FROM `mailacct` WHERE `uid` = %d LIMIT 1",
local_user()
return;
}
- $user = User::getById($a->getUserId());
+ $user = User::getById($a->getLoggedInUserId());
$username = $user['username'];
$email = $user['email'];
- $nickname = $a->getUserNickname();
+ $nickname = $a->getLoggedInUserNickname();
$timezone = $user['timezone'];
$language = $user['language'];
$notify = $user['notify-flags'];
'$cntunkmail' => ['cntunkmail', DI::l10n()->t('Maximum private messages per day from unknown people:'), $cntunkmail , DI::l10n()->t("\x28to prevent spam abuse\x29")],
'$group_select' => Group::displayGroupSelection(local_user(), $user['def_gid']),
'$permissions' => DI::l10n()->t('Default Post Permissions'),
- '$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->getUserId()),
+ '$aclselect' => ACL::getFullSelectorHTML(DI::page(), $a->getLoggedInUserId()),
'$expire' => [
'label' => DI::l10n()->t('Expiration settings'),
'$notify7' => ['notify7', DI::l10n()->t('You are tagged in a post'), ($notify & Notification\Type::TAG_SELF), Notification\Type::TAG_SELF, ''],
'$notify8' => ['notify8', DI::l10n()->t('You are poked/prodded/etc. in a post'), ($notify & Notification\Type::POKE), Notification\Type::POKE, ''],
+ '$lbl_notify' => DI::l10n()->t('Create a desktop notification when:'),
+ '$notify_like' => ['notify_like', DI::l10n()->t('Someone liked your content'), DI::pConfig()->get(local_user(), 'system', 'notify_like'), ''],
+ '$notify_announce' => ['notify_announce', DI::l10n()->t('Someone shared your content'), DI::pConfig()->get(local_user(), 'system', 'notify_announce'), ''],
+
'$desktop_notifications' => ['desktop_notifications', DI::l10n()->t('Activate desktop notifications') , false, DI::l10n()->t('Show desktop popup on new notifications')],
'$email_textonly' => ['email_textonly', DI::l10n()->t('Text-only notification emails'),