mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 04:29:28 +01:00
fixed not working deleteAccount hook, constructor throws exception if called without argument --> using static method now
This commit is contained in:
parent
9f8aa313df
commit
2787d8d843
@ -622,10 +622,9 @@ final class notifications {
|
|||||||
*/
|
*/
|
||||||
public function deleteaccount($settings) {
|
public function deleteaccount($settings) {
|
||||||
foreach($this->backends as $backend) {
|
foreach($this->backends as $backend) {
|
||||||
$notification_backend = self::_appname.'_'.$backend;
|
$backend_hook = array(self::_appname.'_'.$backend,'deleteaccount');
|
||||||
$backend_obj = new $notification_backend();
|
if (is_callable($backend_hook)) {
|
||||||
if(method_exists($backend_obj, 'deleteaccount')) {
|
call_user_func($backend_hook,$settings);
|
||||||
$backend_obj->deleteaccount($settings);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -197,8 +197,8 @@ class notifications_popup implements notifications_iface {
|
|||||||
*
|
*
|
||||||
* @param settings array with keys account_id and new_owner (new_owner is optional)
|
* @param settings array with keys account_id and new_owner (new_owner is optional)
|
||||||
*/
|
*/
|
||||||
public function deleteaccount($settings) {
|
public static function deleteaccount($settings) {
|
||||||
$this->db->delete( self::_notification_table, array(
|
$GLOBALS['egw']->db->delete( self::_notification_table, array(
|
||||||
'account_id' => $settings['account_id']
|
'account_id' => $settings['account_id']
|
||||||
),__LINE__,__FILE__,self::_appname);
|
),__LINE__,__FILE__,self::_appname);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user