aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoseph Warner <hardolaf@hardolaf.com>2013-06-25 21:56:58 -0400
committerJoseph Warner <hardolaf@hardolaf.com>2013-06-25 21:59:19 -0400
commit4f3f0a8791cea806cc63cfe4709605ad63f8cbd4 (patch)
treeeefb2e2de73d76a31212e0cb25ca80dc3f9157e2
parent5f3ed197e73550e78b37dd38496210737cf3f39d (diff)
downloadforums-4f3f0a8791cea806cc63cfe4709605ad63f8cbd4.tar
forums-4f3f0a8791cea806cc63cfe4709605ad63f8cbd4.tar.gz
forums-4f3f0a8791cea806cc63cfe4709605ad63f8cbd4.tar.bz2
forums-4f3f0a8791cea806cc63cfe4709605ad63f8cbd4.tar.xz
forums-4f3f0a8791cea806cc63cfe4709605ad63f8cbd4.zip
[feature/auth-refactor] Remove references to old auth plugins
Removes what is hopefully the last references to the old auth plugins in the code base. PHPBB3-9734
-rw-r--r--phpBB/includes/acp/acp_board.php38
1 files changed, 9 insertions, 29 deletions
diff --git a/phpBB/includes/acp/acp_board.php b/phpBB/includes/acp/acp_board.php
index 383e035817..1ac6697255 100644
--- a/phpBB/includes/acp/acp_board.php
+++ b/phpBB/includes/acp/acp_board.php
@@ -523,21 +523,11 @@ class acp_board
{
// Retrieve a list of auth plugins and check their config values
$auth_plugins = array();
+ $auth_providers = $phpbb_container->get('auth.provider_collection');
- $dp = @opendir($phpbb_root_path . 'includes/auth');
-
- if ($dp)
+ foreach($auth_providers as $key => $value)
{
- while (($file = readdir($dp)) !== false)
- {
- if (preg_match('#^provider_(.*?)\.' . $phpEx . '$#', $file) && !preg_match('#^provider_interface\.' . $phpEx . '$#', $file))
- {
- $auth_plugins[] = basename(preg_replace('#^provider_(.*?)\.' . $phpEx . '$#', '\1', $file));
- }
- }
- closedir($dp);
-
- sort($auth_plugins);
+ $auth_plugins[] = str_replace('auth.provider.', '', $key);
}
$updated_auth_settings = false;
@@ -546,7 +536,7 @@ class acp_board
{
if ($method)
{
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider = $auth_providers['auth.provider.' . $method];
if ($provider)
{
if ($fields = $provider->acp($this->new_config))
@@ -585,7 +575,7 @@ class acp_board
$method = basename($cfg_array['auth_method']);
if ($method)
{
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider = $auth_providers['auth.provider.' . $method];
if ($provider)
{
if ($error = $provider->init())
@@ -683,7 +673,7 @@ class acp_board
{
if ($method)
{
- $provider = $phpbb_container->get('auth.provider.' . $method);
+ $provider = $auth_providers['auth.provider.' . $method];
if ($provider)
{
$fields = $provider->acp($this->new_config);
@@ -709,22 +699,12 @@ class acp_board
global $phpbb_root_path, $phpEx;
$auth_plugins = array();
+ $auth_providers = $phpbb_container->get('auth.provider_collection');
- $dp = @opendir($phpbb_root_path . 'includes/auth');
-
- if (!$dp)
- {
- return '';
- }
-
- while (($file = readdir($dp)) !== false)
+ foreach($auth_providers as $key => $value)
{
- if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
- {
- $auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
- }
+ $auth_plugins[] = str_replace('auth.provider.', '', $key);
}
- closedir($dp);
sort($auth_plugins);