From 80a7f6930cff09d771d0146fbf2eae901def004e Mon Sep 17 00:00:00 2001 From: brunoais Date: Wed, 3 Dec 2014 13:48:46 +0000 Subject: [PATCH] [ticket/13146] Adding eventDispatcher to the list PHPBB3-13146 --- phpBB/config/content.yml | 1 + phpBB/phpbb/content_visibility.php | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/phpBB/config/content.yml b/phpBB/config/content.yml index f0985f0292..c62b8e26fb 100644 --- a/phpBB/config/content.yml +++ b/phpBB/config/content.yml @@ -3,6 +3,7 @@ services: class: phpbb\content_visibility arguments: - @auth + - @phpbb_dispatcher - @config - @dbal.conn - @user diff --git a/phpBB/phpbb/content_visibility.php b/phpBB/phpbb/content_visibility.php index 677c70ad5b..59d239deeb 100644 --- a/phpBB/phpbb/content_visibility.php +++ b/phpBB/phpbb/content_visibility.php @@ -43,6 +43,12 @@ class content_visibility */ protected $config; + /** + * Event dispatcher object + * @var \phpbb\event\dispatcher + */ + protected $phpbb_dispatcher; + /** * phpBB root path * @var string @@ -60,6 +66,7 @@ class content_visibility * * @param \phpbb\auth\auth $auth Auth object * @param \phpbb\config\config $config Config object + * @param \phpbb\event\dispatcher $phpbb_dispatcher Event dispatcher object * @param \phpbb\db\driver\driver_interface $db Database object * @param \phpbb\user $user User object * @param string $phpbb_root_path Root path @@ -69,10 +76,11 @@ class content_visibility * @param string $topics_table Topics table name * @param string $users_table Users table name */ - public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) + public function __construct(\phpbb\auth\auth $auth, \phpbb\config\config $config, \phpbb\event\dispatcher $phpbb_dispatcher, \phpbb\db\driver\driver_interface $db, \phpbb\user $user, $phpbb_root_path, $php_ext, $forums_table, $posts_table, $topics_table, $users_table) { $this->auth = $auth; $this->config = $config; + $this->phpbb_dispatcher = $phpbb_dispatcher; $this->db = $db; $this->user = $user; $this->phpbb_root_path = $phpbb_root_path;