# R34680 - in /trunk/notifications/inc: class.notifications.inc.php class.notifications\_popup.inc.php

**URL:** <https://help.egroupware.org/t/r34680-in-trunk-notifications-inc-class-notifications-inc-php-class-notifications-popup-inc-php/46977>\
**Category:** eGW-svn\
**Created:** [April 14, 2011, 3:09pm UTC](https://help.egroupware.org/t/r34680-in-trunk-notifications-inc-class-notifications-inc-php-class-notifications-popup-inc-php/46977 "2011-04-14T15:09:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralfbecker\_sf](https://help.egroupware.org/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@ralfbecker\_sf](https://help.egroupware.org/u/ralfbecker_sf)\
**Post date:** [April 14, 2011, 3:09pm UTC](https://help.egroupware.org/t/r34680-in-trunk-notifications-inc-class-notifications-inc-php-class-notifications-popup-inc-php/46977/1 "2011-04-14T15:09:36Z")

</div>

Author: ralfbecker  
New Revision: 34680

URL: [http://www.egroupware.org/viewvc/egroupware?rev=34680&view=rev](http://www.egroupware.org/viewvc/egroupware?rev=34680&view=rev)  
Log:  
fixed not working deleteAccount hook, constructor throws exception if called without argument --\> using static method now

Modified:  
trunk/notifications/inc/class.notifications.inc.php  
trunk/notifications/inc/class.notifications\_popup.inc.php

# Modified: trunk/notifications/inc/class.notifications.inc.php URL: [http://www.egroupware.org/viewvc/egroupware/trunk/notifications/inc/class.notifications.inc.php?rev=34680&r1=34679&r2=34680&view=diff](http://www.egroupware.org/viewvc/egroupware/trunk/notifications/inc/class.notifications.inc.php?rev=34680&r1=34679&r2=34680&view=diff)

— trunk/notifications/inc/class.notifications.inc.php (original)  
+++ trunk/notifications/inc/class.notifications.inc.php Thu Apr 14 17:09:36 2011  
@@ -622,10 +622,9 @@  
\*/  
public function deleteaccount($settings) {  
foreach($this-\>backends as $backend) {

- 

```
  	$notification_backend = self::_appname.'_'.$backend;

```

- 

```
  	$backend_obj = new $notification_backend();

```

- 

```
  	if(method_exists($backend_obj, 'deleteaccount')) {

```

- 

```
  		$backend_obj->deleteaccount($settings);

```

- 

```
  	$backend_hook = array(self::_appname.'_'.$backend,'deleteaccount');

```

- 

```
  	if (is_callable($backend_hook)) {

```

- 

```
  		call_user_func($backend_hook,$settings);
  	}
  }

```

}

# Modified: trunk/notifications/inc/class.notifications\_popup.inc.php URL: [http://www.egroupware.org/viewvc/egroupware/trunk/notifications/inc/class.notifications\_popup.inc.php?rev=34680&r1=34679&r2=34680&view=diff](http://www.egroupware.org/viewvc/egroupware/trunk/notifications/inc/class.notifications_popup.inc.php?rev=34680&r1=34679&r2=34680&view=diff)

— trunk/notifications/inc/class.notifications\_popup.inc.php (original)  
+++ trunk/notifications/inc/class.notifications\_popup.inc.php Thu Apr 14 17:09:36 2011  
@@ -197,8 +197,8 @@  
\*  
\* @param settings array with keys account\_id and new\_owner (new\_owner is optional)  
\*/

- public function deleteaccount($settings) {
- 

```
  $this->db->delete( self::_notification_table, array(

```

- public static function deleteaccount($settings) {
- 

```
  $GLOBALS['egw']->db->delete( self::_notification_table, array(
  	'account_id'	=> $settings['account_id']
  ), __LINE__ , __FILE__ ,self::_appname);

```

}

* * *

Benefiting from Server Virtualization: Beyond Initial Workload  
Consolidation – Increasing the use of server virtualization is a top  
priority.Virtualization can reduce costs, simplify management, and improve  
application availability and disaster protection. Learn more about boosting  
the value of server virtualization. [http://p.sf.net/sfu/vmware-sfdev2dev](http://p.sf.net/sfu/vmware-sfdev2dev)

* * *

eGroupWare-cvs mailing list  
[eGroupWare-cvs@lists.sourceforge.net](mailto:eGroupWare-cvs@lists.sourceforge.net)  
[https://lists.sourceforge.net/lists/listinfo/egroupware-cvs](https://lists.sourceforge.net/lists/listinfo/egroupware-cvs)
