From 42fbc589a815adef579b33ca2b83449bec01e05e Mon Sep 17 00:00:00 2001 From: Michael M Slusarz Date: Wed, 24 Jun 2009 17:49:35 -0600 Subject: [PATCH] Fix some case issues; missed a static declaration --- framework/Notification/lib/Horde/Notification.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/framework/Notification/lib/Horde/Notification.php b/framework/Notification/lib/Horde/Notification.php index f4ed48d9f..ba9a201b9 100644 --- a/framework/Notification/lib/Horde/Notification.php +++ b/framework/Notification/lib/Horde/Notification.php @@ -19,7 +19,7 @@ class Horde_Notification * * @var Horde_Notification */ - protected $_instances = array(); + static protected $_instances = array(); /** * Hash containing all attached listener objects. @@ -105,13 +105,13 @@ class Horde_Notification */ public function attach($listener, $params = array(), $class = null) { - $listener = basename($listener); + $listener = ucfirst(basename($listener)); if (!empty($this->_listeners[$listener])) { return $this->_listeners[$listener]; } if (is_null($class)) { - $class = 'Horde_Notification_Listener_' . ucfirst($listener); + $class = 'Horde_Notification_Listener_' . $listener; } if (class_exists($class)) { @@ -122,7 +122,7 @@ class Horde_Notification return $this->_listeners[$listener]; } - throw new Horde_Exception(sprintf('Notification listener %s not found.', $listener)); + throw new Horde_Exception(sprintf('Notification listener %s not found.', $class)); } /** @@ -134,7 +134,7 @@ class Horde_Notification */ public function detach($listener) { - $listener = basename($listener); + $listener = ucfirst(basename($listener)); if (!isset($this->_listeners[$listener])) { throw new Horde_Exception(sprintf('Notification listener %s not found.', $listener)); } -- 2.11.0