mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 14:28:56 +00:00
[ticket/11413] Remove remaining irrelevant code to this PR
PHPBB3-11413
This commit is contained in:
parent
77147b53c1
commit
3c76cdeb67
5 changed files with 26 additions and 28 deletions
|
@ -19,7 +19,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -37,7 +37,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -55,7 +55,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -73,7 +73,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -91,7 +91,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -109,7 +109,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -127,7 +127,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -145,7 +145,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -163,7 +163,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -181,7 +181,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -199,7 +199,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -217,7 +217,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -235,7 +235,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -253,7 +253,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -271,7 +271,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -289,7 +289,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
@ -304,7 +304,7 @@ services:
|
||||||
arguments:
|
arguments:
|
||||||
- @user_loader
|
- @user_loader
|
||||||
- @dbal.conn
|
- @dbal.conn
|
||||||
- @cache
|
- @cache.driver
|
||||||
- @user
|
- @user
|
||||||
- @auth
|
- @auth
|
||||||
- @config
|
- @config
|
||||||
|
|
|
@ -30,7 +30,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||||
/** @var phpbb_db_driver */
|
/** @var phpbb_db_driver */
|
||||||
protected $db;
|
protected $db;
|
||||||
|
|
||||||
/** @var phpbb_cache_service */
|
/** @var phpbb_cache_driver_interface */
|
||||||
protected $cache;
|
protected $cache;
|
||||||
|
|
||||||
/** @var phpbb_template */
|
/** @var phpbb_template */
|
||||||
|
@ -96,7 +96,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||||
*
|
*
|
||||||
* @param phpbb_user_loader $user_loader
|
* @param phpbb_user_loader $user_loader
|
||||||
* @param phpbb_db_driver $db
|
* @param phpbb_db_driver $db
|
||||||
* @param phpbb_cache_service $cache
|
* @param phpbb_cache_driver_interface $cache
|
||||||
* @param phpbb_user $user
|
* @param phpbb_user $user
|
||||||
* @param phpbb_auth $auth
|
* @param phpbb_auth $auth
|
||||||
* @param phpbb_config $config
|
* @param phpbb_config $config
|
||||||
|
@ -107,7 +107,7 @@ abstract class phpbb_notification_type_base implements phpbb_notification_type_i
|
||||||
* @param string $user_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_service $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 $db, phpbb_cache_driver_interface $cache, $user, phpbb_auth $auth, phpbb_config $config, $phpbb_root_path, $php_ext, $notification_types_table, $notifications_table, $user_notifications_table)
|
||||||
{
|
{
|
||||||
$this->user_loader = $user_loader;
|
$this->user_loader = $user_loader;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
|
|
|
@ -28,12 +28,10 @@ class phpbb_notification_manager_helper extends phpbb_notification_manager
|
||||||
|
|
||||||
// Extra dependencies for get_*_class functions
|
// Extra dependencies for get_*_class functions
|
||||||
protected $auth = null;
|
protected $auth = null;
|
||||||
protected $cache = null;
|
|
||||||
protected $config = null;
|
protected $config = null;
|
||||||
public function setDependencies($auth, $cache, $config)
|
public function setDependencies($auth, $config)
|
||||||
{
|
{
|
||||||
$this->auth = $auth;
|
$this->auth = $auth;
|
||||||
$this->cache = $cache;
|
|
||||||
$this->config = $config;
|
$this->config = $config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +42,7 @@ class phpbb_notification_manager_helper extends phpbb_notification_manager
|
||||||
{
|
{
|
||||||
$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, $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);
|
||||||
|
|
||||||
$item->set_notification_manager($this);
|
$item->set_notification_manager($this);
|
||||||
|
|
||||||
|
@ -60,7 +58,7 @@ class phpbb_notification_manager_helper extends phpbb_notification_manager
|
||||||
{
|
{
|
||||||
$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, $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);
|
||||||
|
|
||||||
$method->set_notification_manager($this);
|
$method->set_notification_manager($this);
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ class phpbb_notification_test extends phpbb_database_test_case
|
||||||
'phpbb_user_notifications'
|
'phpbb_user_notifications'
|
||||||
);
|
);
|
||||||
|
|
||||||
$this->notifications->setDependencies($this->auth, $this->cache, $this->config);
|
$this->notifications->setDependencies($this->auth, $this->config);
|
||||||
|
|
||||||
$types = array();
|
$types = array();
|
||||||
foreach (array(
|
foreach (array(
|
||||||
|
@ -123,7 +123,7 @@ class phpbb_notification_test extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
$this->assertEquals(3, $this->notifications->get_notification_type_id('fail'));
|
$this->assertEquals(3, $this->notifications->get_notification_type_id('fail'));
|
||||||
|
|
||||||
$this->fail('Non-existant type should throw exception');
|
$this->fail('Non-existent type should throw an exception');
|
||||||
}
|
}
|
||||||
catch (Exception $e) {}
|
catch (Exception $e) {}
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,7 +106,7 @@ class phpbb_notification_submit_post_base extends phpbb_database_test_case
|
||||||
{
|
{
|
||||||
$class_name = 'phpbb_notification_type_' . $type;
|
$class_name = 'phpbb_notification_type_' . $type;
|
||||||
$class = new $class_name(
|
$class = new $class_name(
|
||||||
$user_loader, $db, $cache, $user, $auth, $config,
|
$user_loader, $db, $cache->get_driver(), $user, $auth, $config,
|
||||||
$phpbb_root_path, $phpEx,
|
$phpbb_root_path, $phpEx,
|
||||||
NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
|
NOTIFICATION_TYPES_TABLE, NOTIFICATIONS_TABLE, USER_NOTIFICATIONS_TABLE);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue