diff --git a/notifications/inc/class.notifications.inc.php b/notifications/inc/class.notifications.inc.php index b9ce011326..e0b7a64b8e 100644 --- a/notifications/inc/class.notifications.inc.php +++ b/notifications/inc/class.notifications.inc.php @@ -36,6 +36,11 @@ final class notifications { */ const _fallback = 'email_only'; + /** + * backend to use if EGroupware user has no preferenc set and no default preference set + */ + const user_fallback = 'popup_or_email'; + /** * registered backends * @var array @@ -376,7 +381,7 @@ final class notifications { $notification_chain = $available_chains[self::_fallback]; } } else { - $notification_chain = $available_chains[self::_fallback]; // fallback: no prefs + $notification_chain = $available_chains[self::user_fallback]; // fallback: no prefs } } else { $notification_chain = $available_chains[self::_fallback]; // fallback: no rights to app @@ -535,6 +540,7 @@ final class notifications { foreach($this->backends as $id => $backend) { switch($backend) { case 'email': + case 'popup': $enabled_backends[$backend] = true; // fallback must always be enabled break; default: @@ -617,7 +623,7 @@ final class notifications { /** * Actions to take when an account is deleted - * + * * @param settings array with keys account_id and new_owner (new_owner is optional) */ public function deleteaccount($settings) { diff --git a/notifications/inc/hook_settings.inc.php b/notifications/inc/hook_settings.inc.php index be86a63fd1..f4e92e7633 100644 --- a/notifications/inc/hook_settings.inc.php +++ b/notifications/inc/hook_settings.inc.php @@ -16,7 +16,7 @@ $verbosity_values = array( 'medium' => lang('medium'), 'high' => lang('high'), ); - + $GLOBALS['settings'] = array( 'notification_chain' => array( 'type' => 'select', @@ -26,6 +26,7 @@ $GLOBALS['settings'] = array( 'help' => 'Choose a notification-chain. You will be notified over the backends included in the chain.
' .'Note: If a notification-chain is marked as "disabled", your Administrator does not allow one or' .' more of the backends included in the chain and notifications falls back to "E-Mail" while notifying you.', + 'default'=> 'popup_or_email', 'xmlrpc' => True, 'admin' => False ), @@ -38,6 +39,7 @@ $GLOBALS['settings'] = array( .'low: just display the notification bell in the topmenu - topmenu must be enabled!
' .'medium: bring notification window to front
' .'high: bring notification window to front and let the browser do something to announce itself', + 'default'=> 'medium', 'xmlrpc' => True, 'admin' => False ), @@ -50,4 +52,3 @@ $GLOBALS['settings'] = array( 'admin' => False ), ); -?> \ No newline at end of file diff --git a/notifications/templates/default/config.tpl b/notifications/templates/default/config.tpl index 1eac222768..cf63aed9c2 100644 --- a/notifications/templates/default/config.tpl +++ b/notifications/templates/default/config.tpl @@ -11,18 +11,21 @@ -  {lang_eGroupWare-Popup_backend} +  {lang_Mail_backend} - {lang_Enable_eGroupWare-Popup_backend} + {lang_choose_from_mailsettings_used_for_notification} - + + - + +  {lang_eGroupWare-Popup_backend} + + {lang_Poll_interval} - + {lang_Maximum_SMS_messages_per_notification} @@ -66,18 +69,6 @@ - -  {lang_Mail_backend} - - - {lang_choose_from_mailsettings_used_for_notification} - - - -