mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
fix: notification popup where broken after ralfs changes, nicify this chagnes
This commit is contained in:
parent
688dd5f46f
commit
90c5388542
@ -125,26 +125,26 @@ final class notification {
|
||||
return $this->receivers;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Small helper function to just send a message
|
||||
*
|
||||
* @param array $receivers
|
||||
* @param string $message
|
||||
* @return Exception
|
||||
*/
|
||||
function notify(array $receivers,$message)
|
||||
{
|
||||
$notification = new notification();
|
||||
$notification->set_receivers($receivers);
|
||||
$notification->set_message($message);
|
||||
try{
|
||||
$notification->send();
|
||||
/**
|
||||
* Small helper function to just send a message
|
||||
*
|
||||
* @abstract To stay php4 compatible for the 1.4 release we don't
|
||||
* throw exeptions here. This behaviour will change after 1.4!
|
||||
* @param array $receivers
|
||||
* @param string $message
|
||||
* @return string
|
||||
*/
|
||||
public static function notify( array $_receivers, $_message ) {
|
||||
$notification = new notification();
|
||||
$notification->set_receivers( $_receivers );
|
||||
$notification->set_message( $_message );
|
||||
try{
|
||||
$notification->send();
|
||||
}
|
||||
catch(Exception $exception) {
|
||||
return $exception->getMessage();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
catch(Exception $exception) {
|
||||
error_log("notify(array($user),'$message'".$exception->getMessage());
|
||||
return $exception;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
@ -68,12 +68,8 @@ class notification_popup implements iface_notification {
|
||||
// If we are called from class notification account and prefs are objects.
|
||||
// otherwise we have to fetch this objects for current user.
|
||||
if (!is_object($_account)) {
|
||||
$_account = (object) $GLOBALS['egw']->accounts->read($_account);
|
||||
$_account->id =& $_account->account_id;
|
||||
// $account_id = $GLOBALS['egw_info']['user']['account_id'];
|
||||
// $this->account = $GLOBALS['egw']->accounts->get_account_data($account_id);
|
||||
// $this->account[$account_id]['id'] = $account_id;
|
||||
// $this->account = (object)$this->account[$account_id];
|
||||
$this->account = (object) $GLOBALS['egw']->accounts->read($_account);
|
||||
$this->account->id =& $this->account->account_id;
|
||||
}
|
||||
else {
|
||||
$this->account = $_account;
|
||||
|
Loading…
Reference in New Issue
Block a user