aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/acp/acp_board.php
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-06-21 18:04:11 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-06-21 18:04:11 -0400
commitb8610c4b989fd1e4e9e310de776de38dfe4a09a2 (patch)
tree01e7fafd5f3ac72a2188ca28e8c1c559d0097b65 /phpBB/includes/acp/acp_board.php
parent95f38b457e6b00cbc3b15b7768d435d467f5bc2c (diff)
downloadforums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar
forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.gz
forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.bz2
forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.tar.xz
forums-b8610c4b989fd1e4e9e310de776de38dfe4a09a2.zip
[feature/auth-refactor] Refactor code to use services
Refactors all loading of auth providers to use services instead of directly calling the class. PHPBB3-9734
Diffstat (limited to 'phpBB/includes/acp/acp_board.php')
-rw-r--r--phpBB/includes/acp/acp_board.php15
1 files changed, 6 insertions, 9 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 9407d81575..383e035817 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -546,10 +546,9 @@ class acp_board
{
if ($method)
{
- $class = 'phpbb_auth_provider_' . $method;
- if (class_exists($class))
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ if ($provider)
{
- $provider = new $class();
if ($fields = $provider->acp($this->new_config))
{
// Check if we need to create config fields for this plugin and save config when submit was pressed
@@ -586,10 +585,9 @@ class acp_board
$method = basename($cfg_array['auth_method']);
if ($method)
{
- $class = 'phpbb_auth_provider_' . $method;
- if (class_exists($class))
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ if ($provider)
{
- $provider = new $class();
if ($error = $provider->init())
{
foreach ($old_auth_config as $config_name => $config_value)
@@ -685,10 +683,9 @@ class acp_board
{
if ($method)
{
- $class = 'phpbb_auth_provider_' . $method;
- if (class_exists($class))
+ $provider = $phpbb_container->get('auth.provider.' . $method);
+ if ($provider)
{
- $provider = new $class();
$fields = $provider->acp($this->new_config);
if ($fields['tpl'])