diff options
| author | Nathan Guse <nathaniel.guse@gmail.com> | 2012-11-21 16:04:01 -0600 |
|---|---|---|
| committer | Nathan Guse <nathaniel.guse@gmail.com> | 2012-11-21 16:04:01 -0600 |
| commit | c911a34b5b7541b46ee2408da366d2dc7c302090 (patch) | |
| tree | 442295658d62b2656598805879672c84ad4b8ed2 | |
| parent | 61aa53f91aaf11bb2fdfac3a9cdc24b074b4463e (diff) | |
| download | forums-c911a34b5b7541b46ee2408da366d2dc7c302090.tar forums-c911a34b5b7541b46ee2408da366d2dc7c302090.tar.gz forums-c911a34b5b7541b46ee2408da366d2dc7c302090.tar.bz2 forums-c911a34b5b7541b46ee2408da366d2dc7c302090.tar.xz forums-c911a34b5b7541b46ee2408da366d2dc7c302090.zip | |
[ticket/11103] Do not prepend notification.(type|method) unless necessary
PHPBB3-11103
| -rw-r--r-- | phpBB/includes/notification/manager.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/phpBB/includes/notification/manager.php b/phpBB/includes/notification/manager.php index ea91496fb9..4c25fa72f0 100644 --- a/phpBB/includes/notification/manager.php +++ b/phpBB/includes/notification/manager.php @@ -755,7 +755,9 @@ class phpbb_notification_manager */ public function get_item_type_class($item_type, $data = array()) { - $item = $this->load_object('notification.type.' . $item_type); + $item_type = (strpos($item_type, 'notification.type.') === 0) ? $item_type : 'notification.type.' . $item_type; + + $item = $this->load_object($item_type); $item->set_initial_data($data); @@ -767,7 +769,9 @@ class phpbb_notification_manager */ public function get_method_class($method_name) { - return $this->load_object('notification.method.' . $method_name); + $method_name = (strpos($method_name, 'notification.method.') === 0) ? $method_name : 'notification.method.' . $method_name; + + return $this->load_object($method_name); } /** |
