mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[ticket/11103] Do not prepend notification.(type|method) unless necessary
PHPBB3-11103
This commit is contained in:
parent
61aa53f91a
commit
c911a34b5b
1 changed files with 6 additions and 2 deletions
|
@ -755,7 +755,9 @@ class phpbb_notification_manager
|
||||||
*/
|
*/
|
||||||
public function get_item_type_class($item_type, $data = array())
|
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);
|
$item->set_initial_data($data);
|
||||||
|
|
||||||
|
@ -767,7 +769,9 @@ class phpbb_notification_manager
|
||||||
*/
|
*/
|
||||||
public function get_method_class($method_name)
|
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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue