[dev] Notification Detach

steve mailling at gmx.co.uk
Fri Dec 26 03:52:05 PST 2003


Here is a patch to add a detach method to lib/Notification.php, hope that helps

diff -w -b -r1.33 Notification.php
106a107,126
 >      * Remove a listener from the notification list
 >      *
 >      * @access public
 >      *
 >      * @param string $listner          The name of the listener to detach.
 >      */
 >     function detach($listener)
 >     {
 >         $listener = basename($listener);
 >         if (!array_key_exists($listener, $this->_listeners)) {
 >             return PEAR::raiseError(sprintf(_("Notification listener %s 
not found."), $listener));
 >         }
 >
 >         $list = $this->_listeners[$listener];
 >         unset($this->_listeners[$listener]);
 >         unset($_SESSION['hordeMessageStacks'][$list->getName()]);
 >         return true;
 >     }
 >
 >     /**



More information about the dev mailing list