Skip to content

Commit 3e2a743

Browse files
committed
Remove unused dependencies from permission helper
1 parent acc3c89 commit 3e2a743

4 files changed

Lines changed: 4 additions & 11 deletions

File tree

controller/admin_controller.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ public function set_ideas_forum_options()
168168

169169
$forum_id = (int) $this->config['ideas_forum_id'];
170170

171-
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->config, $this->db, $this->phpbb_root_path, $this->php_ext);
171+
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->db, $this->phpbb_root_path, $this->php_ext);
172172
$permission_helper->set_ideas_forum_permissions($forum_id);
173173

174174
// Disable auto-pruning for ideas forum

factory/permission_helper.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,6 @@
1212

1313
class permission_helper
1414
{
15-
/**
16-
* @var \phpbb\config\config
17-
*/
18-
protected $config;
19-
2015
/**
2116
* @var \phpbb\db\driver\driver_interface
2217
*/
@@ -35,15 +30,13 @@ class permission_helper
3530
/**
3631
* Constructor
3732
*
38-
* @param \phpbb\config\config $config Config object
3933
* @param \phpbb\db\driver\driver_interface $db Database object
4034
* @param string $phpbb_root_path phpBB root path
4135
* @param string $php_ext php_ext
4236
* @access public
4337
*/
44-
public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext)
38+
public function __construct(\phpbb\db\driver\driver_interface $db, $phpbb_root_path, $php_ext)
4539
{
46-
$this->config = $config;
4740
$this->db = $db;
4841
$this->phpbb_root_path = $phpbb_root_path;
4942
$this->php_ext = $php_ext;

migrations/m13_set_permissions.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function update_data()
4444

4545
public function update_permissions()
4646
{
47-
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->config, $this->db, $this->phpbb_root_path, $this->php_ext);
47+
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->db, $this->phpbb_root_path, $this->php_ext);
4848
$permission_helper->set_ideas_forum_permissions($this->config['ideas_forum_id']);
4949
}
5050
}

tests/factory/permissions_helper_test.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public function test_set_ideas_forum_permissions()
5050
{
5151
global $phpbb_root_path, $phpEx;
5252

53-
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->config, $this->db, $phpbb_root_path, $phpEx);
53+
$permission_helper = new \phpbb\ideas\factory\permission_helper($this->db, $phpbb_root_path, $phpEx);
5454

5555
$permission_helper->set_ideas_forum_permissions($this->config['ideas_forum_id']);
5656

0 commit comments

Comments
 (0)