diff options
author | Nils Adermann <naderman@naderman.de> | 2013-09-10 14:01:09 +0200 |
---|---|---|
committer | Nils Adermann <naderman@naderman.de> | 2013-09-16 00:25:27 +0200 |
commit | b95fdacdd378877d277e261465da73deb06e50da (patch) | |
tree | 01d55340b37f412cecd2d898c302e101b8a0ed19 /phpBB/phpbb/notification | |
parent | 196e1813cd37c47965eb6f254ce6a55210a1b751 (diff) | |
download | forums-b95fdacdd378877d277e261465da73deb06e50da.tar forums-b95fdacdd378877d277e261465da73deb06e50da.tar.gz forums-b95fdacdd378877d277e261465da73deb06e50da.tar.bz2 forums-b95fdacdd378877d277e261465da73deb06e50da.tar.xz forums-b95fdacdd378877d277e261465da73deb06e50da.zip |
[ticket/11700] Move all recent code to namespaces
PHPBB3-11700
Diffstat (limited to 'phpBB/phpbb/notification')
24 files changed, 137 insertions, 89 deletions
diff --git a/phpBB/phpbb/notification/exception.php b/phpBB/phpbb/notification/exception.php index a52d6fdc57..275fb3b542 100644 --- a/phpBB/phpbb/notification/exception.php +++ b/phpBB/phpbb/notification/exception.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification; + /** * @ignore */ @@ -20,7 +22,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_exception extends \Exception +class exception extends \Exception { public function __toString() { diff --git a/phpBB/phpbb/notification/manager.php b/phpBB/phpbb/notification/manager.php index 32e0ef50bc..2a445be90e 100644 --- a/phpBB/phpbb/notification/manager.php +++ b/phpBB/phpbb/notification/manager.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification; + /** * @ignore */ @@ -19,7 +21,7 @@ if (!defined('IN_PHPBB')) * Notifications service class * @package notifications */ -class phpbb_notification_manager +class manager { /** @var array */ protected $notification_types; @@ -30,16 +32,16 @@ class phpbb_notification_manager /** @var ContainerBuilder */ protected $phpbb_container; - /** @var phpbb_user_loader */ + /** @var \phpbb\user_loader */ protected $user_loader; - /** @var phpbb_db_driver */ + /** @var \phpbb\db\driver\driver */ protected $db; - /** @var phpbb_cache_service */ + /** @var \phpbb\cache\service */ protected $cache; - /** @var phpbb_user */ + /** @var \phpbb\user */ protected $user; /** @var string */ @@ -63,17 +65,17 @@ class phpbb_notification_manager * @param array $notification_types * @param array $notification_methods * @param ContainerBuilder $phpbb_container - * @param phpbb_user_loader $user_loader - * @param phpbb_db_driver $db - * @param phpbb_user $user + * @param \phpbb\user_loader $user_loader + * @param \phpbb\db\driver\driver $db + * @param \phpbb\user $user * @param string $phpbb_root_path * @param string $php_ext * @param string $notification_types_table * @param string $notifications_table * @param string $user_notifications_table - * @return phpbb_notification_manager + * @return \phpbb\notification\manager */ - public function __construct($notification_types, $notification_methods, $phpbb_container, phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) + public function __construct($notification_types, $notification_methods, $phpbb_container, \phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\service $cache, $user, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) { $this->notification_types = $notification_types; $this->notification_methods = $notification_methods; @@ -377,8 +379,8 @@ class phpbb_notification_manager // Never send notifications to the anonymous user! unset($notify_users[ANONYMOUS]); - // Make sure not to send new notifications to users who've already been notified about this item - // This may happen when an item was added, but now new users are able to see the item + // Make sure not to send new \notifications to users who've already been notified about this item + // This may happen when an item was added, but now new \users are able to see the item $sql = 'SELECT n.user_id FROM ' . $this->notifications_table . ' n, ' . $this->notification_types_table . ' nt WHERE n.notification_type_id = ' . (int) $notification_type_id . ' @@ -402,7 +404,7 @@ class phpbb_notification_manager $pre_create_data = $notification->pre_create_insert_array($data, $notify_users); unset($notification); - $insert_buffer = new phpbb_db_sql_insert_buffer($this->db, $this->notifications_table); + $insert_buffer = new \phpbb\db\sql_insert_buffer($this->db, $this->notifications_table); // Go through each user so we can insert a row in the DB and then notify them by their desired means foreach ($notify_users as $user => $methods) @@ -525,7 +527,7 @@ class phpbb_notification_manager { $type = $this->get_item_type_class($type_name); - if ($type instanceof phpbb_notification_type_type_interface && $type->is_available()) + if ($type instanceof \phpbb\notification\type\type_interface && $type->is_available()) { $options = array_merge(array( 'id' => $type->get_type(), @@ -561,7 +563,7 @@ class phpbb_notification_manager { $method = $this->get_method_class($method_name); - if ($method instanceof phpbb_notification_method_method_interface && $method->is_available()) + if ($method instanceof \phpbb\notification\method\method_interface && $method->is_available()) { $subscription_methods[$method_name] = array( 'id' => $method->get_type(), @@ -873,7 +875,7 @@ class phpbb_notification_manager { if (!isset($this->notification_types[$notification_type_name]) && !isset($this->notification_types['notification.type.' . $notification_type_name])) { - throw new phpbb_notification_exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name)); + throw new \phpbb\notification\exception($this->user->lang('NOTIFICATION_TYPE_NOT_EXIST', $notification_type_name)); } $sql = 'INSERT INTO ' . $this->notification_types_table . ' ' . $this->db->sql_build_array('INSERT', array( diff --git a/phpBB/phpbb/notification/method/base.php b/phpBB/phpbb/notification/method/base.php index fbff75b59f..327f964424 100644 --- a/phpBB/phpbb/notification/method/base.php +++ b/phpBB/phpbb/notification/method/base.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\method; + /** * @ignore */ @@ -19,33 +21,33 @@ if (!defined('IN_PHPBB')) * Base notifications method class * @package notifications */ -abstract class phpbb_notification_method_base implements phpbb_notification_method_method_interface +abstract class base implements \phpbb\notification\method\method_interface { - /** @var phpbb_notification_manager */ + /** @var \phpbb\notification\manager */ protected $notification_manager; - /** @var phpbb_user_loader */ + /** @var \phpbb\user_loader */ protected $user_loader; - /** @var phpbb_db_driver */ + /** @var \phpbb\db\driver\driver */ protected $db; - /** @var phpbb_cache_driver_driver_interface */ + /** @var \phpbb\cache\driver\driver_interface */ protected $cache; - /** @var phpbb_template */ + /** @var \phpbb\template\template */ protected $template; - /** @var phpbb_extension_manager */ + /** @var \phpbb\extension\manager */ protected $extension_manager; - /** @var phpbb_user */ + /** @var \phpbb\user */ protected $user; - /** @var phpbb_auth */ + /** @var \phpbb\auth\auth */ protected $auth; - /** @var phpbb_config */ + /** @var \phpbb\config\config */ protected $config; /** @var string */ @@ -64,17 +66,17 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth /** * Notification Method Base Constructor * - * @param phpbb_user_loader $user_loader - * @param phpbb_db_driver $db - * @param phpbb_cache_driver_driver_interface $cache - * @param phpbb_user $user - * @param phpbb_auth $auth - * @param phpbb_config $config + * @param \phpbb\user_loader $user_loader + * @param \phpbb\db\driver\driver $db + * @param \phpbb\cache\driver\driver_interface $cache + * @param \phpbb\user $user + * @param \phpbb\auth\auth $auth + * @param \phpbb\config\config $config * @param string $phpbb_root_path * @param string $php_ext - * @return phpbb_notification_method_base + * @return \phpbb\notification\method\base */ - public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext) + public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext) { $this->user_loader = $user_loader; $this->db = $db; @@ -89,9 +91,9 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth /** * Set notification manager (required) * - * @param phpbb_notification_manager $notification_manager + * @param \phpbb\notification\manager $notification_manager */ - public function set_notification_manager(phpbb_notification_manager $notification_manager) + public function set_notification_manager(\phpbb\notification\manager $notification_manager) { $this->notification_manager = $notification_manager; } @@ -99,9 +101,9 @@ abstract class phpbb_notification_method_base implements phpbb_notification_meth /** * Add a notification to the queue * - * @param phpbb_notification_type_type_interface $notification + * @param \phpbb\notification\type\type_interface $notification */ - public function add_to_queue(phpbb_notification_type_type_interface $notification) + public function add_to_queue(\phpbb\notification\type\type_interface $notification) { $this->queue[] = $notification; } diff --git a/phpBB/phpbb/notification/method/email.php b/phpBB/phpbb/notification/method/email.php index 571b0ec656..b761eb5a28 100644 --- a/phpBB/phpbb/notification/method/email.php +++ b/phpBB/phpbb/notification/method/email.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\method; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_method_email extends phpbb_notification_method_messenger_base +class email extends \phpbb\notification\method\messenger_base { /** * Get notification method name diff --git a/phpBB/phpbb/notification/method/jabber.php b/phpBB/phpbb/notification/method/jabber.php index d3b756d020..6ec21bb735 100644 --- a/phpBB/phpbb/notification/method/jabber.php +++ b/phpBB/phpbb/notification/method/jabber.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\method; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_method_jabber extends phpbb_notification_method_messenger_base +class jabber extends \phpbb\notification\method\messenger_base { /** * Get notification method name diff --git a/phpBB/phpbb/notification/method/messenger_base.php b/phpBB/phpbb/notification/method/messenger_base.php index 4966aa94bc..b1b30f29b7 100644 --- a/phpBB/phpbb/notification/method/messenger_base.php +++ b/phpBB/phpbb/notification/method/messenger_base.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\method; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -abstract class phpbb_notification_method_messenger_base extends phpbb_notification_method_base +abstract class messenger_base extends \phpbb\notification\method\base { /** * Notify using phpBB messenger @@ -60,7 +62,7 @@ abstract class phpbb_notification_method_messenger_base extends phpbb_notificati { include($this->phpbb_root_path . 'includes/functions_messenger.' . $this->php_ext); } - $messenger = new messenger(); + $messenger = new \messenger(); $board_url = generate_board_url(); // Time to go through the queue and send emails diff --git a/phpBB/phpbb/notification/method/method_interface.php b/phpBB/phpbb/notification/method/method_interface.php index bd21d924e4..0131a8bde0 100644 --- a/phpBB/phpbb/notification/method/method_interface.php +++ b/phpBB/phpbb/notification/method/method_interface.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\method; + /** * @ignore */ @@ -19,7 +21,7 @@ if (!defined('IN_PHPBB')) * Base notifications method interface * @package notifications */ -interface phpbb_notification_method_method_interface +interface method_interface { /** * Get notification method name @@ -37,9 +39,9 @@ interface phpbb_notification_method_method_interface /** * Add a notification to the queue * - * @param phpbb_notification_type_type_interface $notification + * @param \phpbb\notification\type\type_interface $notification */ - public function add_to_queue(phpbb_notification_type_type_interface $notification); + public function add_to_queue(\phpbb\notification\type\type_interface $notification); /** * Parse the queue and notify the users diff --git a/phpBB/phpbb/notification/type/approve_post.php b/phpBB/phpbb/notification/type/approve_post.php index 1a30781c35..cf4ec57989 100644 --- a/phpBB/phpbb/notification/type/approve_post.php +++ b/phpBB/phpbb/notification/type/approve_post.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_approve_post extends phpbb_notification_type_post +class approve_post extends \phpbb\notification\type\post { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/approve_topic.php b/phpBB/phpbb/notification/type/approve_topic.php index e728e9ac30..ca5bb67754 100644 --- a/phpBB/phpbb/notification/type/approve_topic.php +++ b/phpBB/phpbb/notification/type/approve_topic.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_approve_topic extends phpbb_notification_type_topic +class approve_topic extends \phpbb\notification\type\topic { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/base.php b/phpBB/phpbb/notification/type/base.php index a7434fc9a7..1605f59c55 100644 --- a/phpBB/phpbb/notification/type/base.php +++ b/phpBB/phpbb/notification/type/base.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -19,30 +21,30 @@ if (!defined('IN_PHPBB')) * Base notifications class * @package notifications */ -abstract class phpbb_notification_type_base implements phpbb_notification_type_type_interface +abstract class base implements \phpbb\notification\type\type_interface { - /** @var phpbb_notification_manager */ + /** @var \phpbb\notification\manager */ protected $notification_manager; - /** @var phpbb_user_loader */ + /** @var \phpbb\user_loader */ protected $user_loader; - /** @var phpbb_db_driver */ + /** @var \phpbb\db\driver\driver */ protected $db; - /** @var phpbb_cache_driver_driver_interface */ + /** @var \phpbb\cache\driver\driver_interface */ protected $cache; - /** @var phpbb_template */ + /** @var \phpbb\template\template */ protected $template; - /** @var phpbb_user */ + /** @var \phpbb\user */ protected $user; - /** @var phpbb_auth */ + /** @var \phpbb\auth\auth */ protected $auth; - /** @var phpbb_config */ + /** @var \phpbb\config\config */ protected $config; /** @var string */ @@ -94,20 +96,20 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_t /** * Notification Type Base Constructor * - * @param phpbb_user_loader $user_loader - * @param phpbb_db_driver $db - * @param phpbb_cache_driver_driver_interface $cache - * @param phpbb_user $user - * @param phpbb_auth $auth - * @param phpbb_config $config + * @param \phpbb\user_loader $user_loader + * @param \phpbb\db\driver\driver $db + * @param \phpbb\cache\driver\driver_interface $cache + * @param \phpbb\user $user + * @param \phpbb\auth\auth $auth + * @param \phpbb\config\config $config * @param string $phpbb_root_path * @param string $php_ext * @param string $notification_types_table * @param string $notifications_table * @param string $user_notifications_table - * @return phpbb_notification_type_base + * @return \phpbb\notification\type\base */ - public function __construct(phpbb_user_loader $user_loader, phpbb_db_driver $db, phpbb_cache_driver_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) + public function __construct(\phpbb\user_loader $user_loader, \phpbb\db\driver\driver $db, \phpbb\cache\driver\driver_interface $cache, $user, \phpbb\auth\auth $auth, \phpbb\config\config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table) { $this->user_loader = $user_loader; $this->db = $db; @@ -127,9 +129,9 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_t /** * Set notification manager (required) * - * @param phpbb_notification_manager $notification_manager + * @param \phpbb\notification\manager $notification_manager */ - public function set_notification_manager(phpbb_notification_manager $notification_manager) + public function set_notification_manager(\phpbb\notification\manager $notification_manager) { $this->notification_manager = $notification_manager; @@ -143,7 +145,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_t */ public function set_initial_data($data = array()) { - // The row from the database (unless this is a new notification we're going to add) + // The row from the database (unless this is a new \notification we're going to add) $this->data = $data; $this->data['notification_data'] = (isset($this->data['notification_data'])) ? unserialize($this->data['notification_data']) : array(); } @@ -220,9 +222,9 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_t { // Defaults $this->data = array_merge(array( - 'item_id' => static::get_item_id($type_data), + 'item_id' => \static::get_item_id($type_data), 'notification_type_id' => $this->notification_type_id, - 'item_parent_id' => static::get_item_parent_id($type_data), + 'item_parent_id' => \static::get_item_parent_id($type_data), 'notification_time' => time(), 'notification_read' => false, diff --git a/phpBB/phpbb/notification/type/bookmark.php b/phpBB/phpbb/notification/type/bookmark.php index ae2e75d3eb..5b021eb71a 100644 --- a/phpBB/phpbb/notification/type/bookmark.php +++ b/phpBB/phpbb/notification/type/bookmark.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_bookmark extends phpbb_notification_type_post +class bookmark extends \phpbb\notification\type\post { /** * Get notification type name @@ -112,7 +114,7 @@ class phpbb_notification_type_bookmark extends phpbb_notification_type_post $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - // Do not create a new notification + // Do not create a new \notification unset($notify_users[$row['user_id']]); $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row); diff --git a/phpBB/phpbb/notification/type/disapprove_post.php b/phpBB/phpbb/notification/type/disapprove_post.php index 951c7e0254..0c9162ec5c 100644 --- a/phpBB/phpbb/notification/type/disapprove_post.php +++ b/phpBB/phpbb/notification/type/disapprove_post.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_disapprove_post extends phpbb_notification_type_approve_post +class disapprove_post extends \phpbb\notification\type\approve_post { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/disapprove_topic.php b/phpBB/phpbb/notification/type/disapprove_topic.php index 038e528797..dde6f83ec4 100644 --- a/phpBB/phpbb/notification/type/disapprove_topic.php +++ b/phpBB/phpbb/notification/type/disapprove_topic.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_disapprove_topic extends phpbb_notification_type_approve_topic +class disapprove_topic extends \phpbb\notification\type\approve_topic { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/pm.php b/phpBB/phpbb/notification/type/pm.php index b3db7ad5ad..bed0807b0f 100644 --- a/phpBB/phpbb/notification/type/pm.php +++ b/phpBB/phpbb/notification/type/pm.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_pm extends phpbb_notification_type_base +class pm extends \phpbb\notification\type\base { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/post.php b/phpBB/phpbb/notification/type/post.php index 9207fd866e..24ce0cc145 100644 --- a/phpBB/phpbb/notification/type/post.php +++ b/phpBB/phpbb/notification/type/post.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_post extends phpbb_notification_type_base +class post extends \phpbb\notification\type\base { /** * Get notification type name @@ -147,7 +149,7 @@ class phpbb_notification_type_post extends phpbb_notification_type_base $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - // Do not create a new notification + // Do not create a new \notification unset($notify_users[$row['user_id']]); $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row); diff --git a/phpBB/phpbb/notification/type/post_in_queue.php b/phpBB/phpbb/notification/type/post_in_queue.php index bc4b15cdc3..f05ed1ce9a 100644 --- a/phpBB/phpbb/notification/type/post_in_queue.php +++ b/phpBB/phpbb/notification/type/post_in_queue.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_post_in_queue extends phpbb_notification_type_post +class post_in_queue extends \phpbb\notification\type\post { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/quote.php b/phpBB/phpbb/notification/type/quote.php index 0ed13f36fb..d59f7caf8e 100644 --- a/phpBB/phpbb/notification/type/quote.php +++ b/phpBB/phpbb/notification/type/quote.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_quote extends phpbb_notification_type_post +class quote extends \phpbb\notification\type\post { /** * Get notification type name @@ -131,7 +133,7 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post $result = $this->db->sql_query($sql); while ($row = $this->db->sql_fetchrow($result)) { - // Do not create a new notification + // Do not create a new \notification unset($notify_users[$row['user_id']]); $notification = $this->notification_manager->get_item_type_class($this->get_type(), $row); @@ -166,7 +168,7 @@ class phpbb_notification_type_quote extends phpbb_notification_type_post } $this->db->sql_freeresult($result); - // Find the new users to notify + // Find the new \users to notify $notifications = $this->find_users_for_notification($post); // Find the notifications we must delete diff --git a/phpBB/phpbb/notification/type/report_pm.php b/phpBB/phpbb/notification/type/report_pm.php index 3fa73bab41..fd3f754f8a 100644 --- a/phpBB/phpbb/notification/type/report_pm.php +++ b/phpBB/phpbb/notification/type/report_pm.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_report_pm extends phpbb_notification_type_pm +class report_pm extends \phpbb\notification\type\pm { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/report_pm_closed.php b/phpBB/phpbb/notification/type/report_pm_closed.php index 63dfa92064..2e4a1ceb30 100644 --- a/phpBB/phpbb/notification/type/report_pm_closed.php +++ b/phpBB/phpbb/notification/type/report_pm_closed.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_report_pm_closed extends phpbb_notification_type_pm +class report_pm_closed extends \phpbb\notification\type\pm { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/report_post.php b/phpBB/phpbb/notification/type/report_post.php index de5c54a291..c2dad6f1bb 100644 --- a/phpBB/phpbb/notification/type/report_post.php +++ b/phpBB/phpbb/notification/type/report_post.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_report_post extends phpbb_notification_type_post_in_queue +class report_post extends \phpbb\notification\type\post_in_queue { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/report_post_closed.php b/phpBB/phpbb/notification/type/report_post_closed.php index 3916cd8db7..270ccf0a1a 100644 --- a/phpBB/phpbb/notification/type/report_post_closed.php +++ b/phpBB/phpbb/notification/type/report_post_closed.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_report_post_closed extends phpbb_notification_type_post +class report_post_closed extends \phpbb\notification\type\post { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/topic.php b/phpBB/phpbb/notification/type/topic.php index 22436d3fb1..9042a21017 100644 --- a/phpBB/phpbb/notification/type/topic.php +++ b/phpBB/phpbb/notification/type/topic.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -17,11 +19,11 @@ if (!defined('IN_PHPBB')) /** * Topic notifications class -* This class handles notifications for new topics +* This class handles notifications for new \topics * * @package notifications */ -class phpbb_notification_type_topic extends phpbb_notification_type_base +class topic extends \phpbb\notification\type\base { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/topic_in_queue.php b/phpBB/phpbb/notification/type/topic_in_queue.php index f735e10c00..056651bc53 100644 --- a/phpBB/phpbb/notification/type/topic_in_queue.php +++ b/phpBB/phpbb/notification/type/topic_in_queue.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -21,7 +23,7 @@ if (!defined('IN_PHPBB')) * * @package notifications */ -class phpbb_notification_type_topic_in_queue extends phpbb_notification_type_topic +class topic_in_queue extends \phpbb\notification\type\topic { /** * Get notification type name diff --git a/phpBB/phpbb/notification/type/type_interface.php b/phpBB/phpbb/notification/type/type_interface.php index f9c65f7286..cfc6cd461e 100644 --- a/phpBB/phpbb/notification/type/type_interface.php +++ b/phpBB/phpbb/notification/type/type_interface.php @@ -7,6 +7,8 @@ * */ +namespace phpbb\notification\type; + /** * @ignore */ @@ -19,7 +21,7 @@ if (!defined('IN_PHPBB')) * Base notifications interface * @package notifications */ -interface phpbb_notification_type_type_interface +interface type_interface { /** * Get notification type name |