[dev] new function for Notification.php
Jan Schneider
jan at horde.org
Sun Aug 17 04:55:40 PDT 2003
Zitat von steve <mailling at gmx.co.uk>:
> I added a new function for horde/lib/Notification.php to remove a
> listener
> not needed any more.
That's a nice patch, but:
- please send it as an attached unified diff.
- name the methode "detach"
- don't use fatal but return the error object instead.
- fix the indention and docs.
> diff -w -b -r1.29 Notification.php
> 106a107,122
> > * Remove a listener from the notification list
> > * @param string $driver The name of the listener to
> attach.
> > */
> > function unattach($listener)
> > {
> > $listener = String::lower(basename($listener));
> > if (!array_key_exists($listener, $this->_listeners)) {
> > Horde::fatal(PEAR::raiseError(sprintf(_("Notification
> listener %s not found."), $listener)), __FILE__, __LINE__);
> > }
> >
> > unset($this->_listeners[$listener]);
> > unset($_SESSION['hordeMessageStacks'][$listener]);
> > return;
> > }
> >
> > /**
> 138a155
> >
>
>
> --
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe at lists.horde.org
>
>
Jan.
--
http://www.horde.org - The Horde Project
http://www.ammma.de - discover your knowledge
http://www.tip4all.de - Deine private Tippgemeinschaft
More information about the dev
mailing list