diff options
author | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-25 22:21:38 -0400 |
---|---|---|
committer | Joseph Warner <hardolaf@hardolaf.com> | 2013-06-25 22:21:38 -0400 |
commit | 3c394aee6208277eb852764ca6b4ef50e2832301 (patch) | |
tree | 7fd421c0c453b17dc4435bd0a7bb964ce480267e | |
parent | b78b6711c80f2a47f3ab71dde9b733e04d9b523d (diff) | |
download | forums-3c394aee6208277eb852764ca6b4ef50e2832301.tar forums-3c394aee6208277eb852764ca6b4ef50e2832301.tar.gz forums-3c394aee6208277eb852764ca6b4ef50e2832301.tar.bz2 forums-3c394aee6208277eb852764ca6b4ef50e2832301.tar.xz forums-3c394aee6208277eb852764ca6b4ef50e2832301.zip |
[feature/auth-refactor] Refactor auth in acp_board
Changes the acp_board code to directly call the auth providers out
of the $auth_providers variable that is populated by the
phpbb_container.
PHPBB3-9734
-rw-r--r-- | phpBB/includes/acp/acp_board.php | 25 |
1 files changed, 3 insertions, 22 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php index bff5a3e64d..d6bf2d637b 100644 --- a/phpBB/includes/acp/acp_board.php +++ b/phpBB/includes/acp/acp_board.php @@ -525,20 +525,10 @@ class acp_board $auth_plugins = array(); $auth_providers = $phpbb_container->get('auth.provider_collection'); - foreach($auth_providers as $key => $value) - { - $auth_plugins[] = $key; - } - $updated_auth_settings = false; $old_auth_config = array(); - foreach ($auth_plugins as $method) + foreach ($auth_providers as $provider) { - if ($method) - { - $provider = $auth_providers[$method]; - if ($provider) - { 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 @@ -566,8 +556,6 @@ class acp_board } } unset($fields); - } - } } if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings)) @@ -575,7 +563,7 @@ class acp_board $method = basename($cfg_array['auth_method']); if ($method) { - $provider = $auth_providers[$method]; + $provider = $auth_providers['auth.provider.' . $method]; if ($provider) { if ($error = $provider->init()) @@ -669,13 +657,8 @@ class acp_board { $template->assign_var('S_AUTH', true); - foreach ($auth_plugins as $method) + foreach ($auth_provider as $provider) { - if ($method) - { - $provider = $auth_providers[$method]; - if ($provider) - { $fields = $provider->acp($this->new_config); if ($fields['tpl']) @@ -685,8 +668,6 @@ class acp_board ); } unset($fields); - } - } } } } |