[ticket/14729] Make reports take config base class

Make the report controller and helper classes accept the more generic
phpbb/config/config base class in their constructors, instead of the
specific database implementation phpbb/config/db.

PHPBB3-14729
This commit is contained in:
Wesley Fok 2016-08-03 13:42:36 -04:00
parent 3d4660a703
commit 8a9cf32b1d
2 changed files with 4 additions and 4 deletions

View file

@ -19,7 +19,7 @@ use Symfony\Component\HttpFoundation\RedirectResponse;
class report class report
{ {
/** /**
* @var \phpbb\config\db * @var \phpbb\config\config
*/ */
protected $config; protected $config;
@ -68,7 +68,7 @@ class report
*/ */
protected $report_reason_provider; protected $report_reason_provider;
public function __construct(\phpbb\config\db $config, \phpbb\user $user, \phpbb\template\template $template, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\captcha\factory $captcha_factory, \phpbb\report\handler_factory $report_factory, \phpbb\report\report_reason_list_provider $ui_provider, $phpbb_root_path, $php_ext) public function __construct(\phpbb\config\config $config, \phpbb\user $user, \phpbb\template\template $template, \phpbb\controller\helper $helper, \phpbb\request\request_interface $request, \phpbb\captcha\factory $captcha_factory, \phpbb\report\handler_factory $report_factory, \phpbb\report\report_reason_list_provider $ui_provider, $phpbb_root_path, $php_ext)
{ {
$this->config = $config; $this->config = $config;
$this->user = $user; $this->user = $user;

View file

@ -26,7 +26,7 @@ abstract class report_handler implements report_handler_interface
protected $dispatcher; protected $dispatcher;
/** /**
* @var \phpbb\config\db * @var \phpbb\config\config
*/ */
protected $config; protected $config;
@ -60,7 +60,7 @@ abstract class report_handler implements report_handler_interface
* @param \phpbb\user $user * @param \phpbb\user $user
* @param \phpbb\notification\manager $notification * @param \phpbb\notification\manager $notification
*/ */
public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\db $config, \phpbb\auth\auth $auth, \phpbb\user $user, \phpbb\notification\manager $notification) public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\event\dispatcher_interface $dispatcher, \phpbb\config\config $config, \phpbb\auth\auth $auth, \phpbb\user $user, \phpbb\notification\manager $notification)
{ {
$this->db = $db; $this->db = $db;
$this->dispatcher = $dispatcher; $this->dispatcher = $dispatcher;