mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
[ticket/11700] Correclty use namespaces in notifications
PHPBB3-11700
This commit is contained in:
parent
239381b946
commit
2a1207b14f
6 changed files with 21 additions and 19 deletions
|
@ -222,9 +222,9 @@ abstract class base implements \phpbb\notification\type\type_interface
|
||||||
{
|
{
|
||||||
// Defaults
|
// Defaults
|
||||||
$this->data = array_merge(array(
|
$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,
|
'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_time' => time(),
|
||||||
'notification_read' => false,
|
'notification_read' => false,
|
||||||
|
|
|
@ -25,7 +25,7 @@ class phpbb_notification_convert_test extends phpbb_database_test_case
|
||||||
|
|
||||||
$this->db = $this->new_dbal();
|
$this->db = $this->new_dbal();
|
||||||
|
|
||||||
$this->migration = new \phpbb\db\migration\data0\notification_options_reconvert(
|
$this->migration = new \phpbb\db\migration\data\v310\notification_options_reconvert(
|
||||||
new \phpbb\config\config(array()),
|
new \phpbb\config\config(array()),
|
||||||
$this->db,
|
$this->db,
|
||||||
new \phpbb\db\tools($this->db),
|
new \phpbb\db\tools($this->db),
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
namespace phpbb\notification\type;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ignore
|
* @ignore
|
||||||
*/
|
*/
|
||||||
|
@ -15,7 +17,7 @@ if (!defined('IN_PHPBB'))
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
class phpbb_notification_type_test extends \phpbb\notification\type\base
|
class test extends \phpbb\notification\type\base
|
||||||
{
|
{
|
||||||
public function get_type()
|
public function get_type()
|
||||||
{
|
{
|
||||||
|
|
|
@ -40,7 +40,7 @@ class phpbb_notification_manager_helper extends \phpbb\notification\manager
|
||||||
*/
|
*/
|
||||||
public function get_item_type_class($item_type, $data = array())
|
public function get_item_type_class($item_type, $data = array())
|
||||||
{
|
{
|
||||||
$item_type = 'phpbb_notification_type_' . $item_type;
|
$item_type = 'phpbb\notification\type\\' . $item_type;
|
||||||
|
|
||||||
$item = new $item_type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
|
$item = new $item_type($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ class phpbb_notification_manager_helper extends \phpbb\notification\manager
|
||||||
*/
|
*/
|
||||||
public function get_method_class($method_name)
|
public function get_method_class($method_name)
|
||||||
{
|
{
|
||||||
$method_name = 'phpbb_notification_method_' . $method_name;
|
$method_name = 'phpbb\notification\method\\' . $method_name;
|
||||||
|
|
||||||
$method = new $method_name($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
|
$method = new $method_name($this->user_loader, $this->db, $this->cache->get_driver(), $this->user, $this->auth, $this->config, $this->phpbb_root_path, $this->php_ext, $this->notification_types_table, $this->notifications_table, $this->user_notifications_table);
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ class phpbb_notification_test extends phpbb_database_test_case
|
||||||
'topic_in_queue',
|
'topic_in_queue',
|
||||||
) as $type)
|
) as $type)
|
||||||
{
|
{
|
||||||
$class = $this->build_type('phpbb_notification_type_' . $type);
|
$class = $this->build_type('\phpbb\notification\type\\' . $type);
|
||||||
|
|
||||||
$types[$type] = $class;
|
$types[$type] = $class;
|
||||||
$this->container->set('notification.type.' . $type, $class);
|
$this->container->set('notification.type.' . $type, $class);
|
||||||
|
|
|
@ -105,7 +105,7 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
|
||||||
$notification_types_array = array();
|
$notification_types_array = array();
|
||||||
foreach ($notification_types as $type)
|
foreach ($notification_types as $type)
|
||||||
{
|
{
|
||||||
$class_name = 'phpbb_notification_type_' . $type;
|
$class_name = '\phpbb\notification\type\\' . $type;
|
||||||
$class = new $class_name(
|
$class = new $class_name(
|
||||||
$user_loader, $db, $cache->get_driver(), $user, $auth, $config,
|
$user_loader, $db, $cache->get_driver(), $user, $auth, $config,
|
||||||
$phpbb_root_path, $phpEx,
|
$phpbb_root_path, $phpEx,
|
||||||
|
|
Loading…
Add table
Reference in a new issue