* Notifications: popup and email are enabled per default, default preference is "popup_or_email"

This commit is contained in:
Ralf Becker
2011-06-14 13:55:06 +00:00
parent 47439899a5
commit 7b2a5dd23f
3 changed files with 21 additions and 23 deletions

View File

@@ -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) {