[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
This commit is contained in:
Joseph Warner 2013-06-25 21:56:58 -04:00
parent 5f3ed197e7
commit 4f3f0a8791

View file

@ -523,21 +523,11 @@ class acp_board
{ {
// Retrieve a list of auth plugins and check their config values // Retrieve a list of auth plugins and check their config values
$auth_plugins = array(); $auth_plugins = array();
$auth_providers = $phpbb_container->get('auth.provider_collection');
$dp = @opendir($phpbb_root_path . 'includes/auth'); foreach($auth_providers as $key => $value)
if ($dp)
{ {
while (($file = readdir($dp)) !== false) $auth_plugins[] = str_replace('auth.provider.', '', $key);
{
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);
} }
$updated_auth_settings = false; $updated_auth_settings = false;
@ -546,7 +536,7 @@ class acp_board
{ {
if ($method) if ($method)
{ {
$provider = $phpbb_container->get('auth.provider.' . $method); $provider = $auth_providers['auth.provider.' . $method];
if ($provider) if ($provider)
{ {
if ($fields = $provider->acp($this->new_config)) if ($fields = $provider->acp($this->new_config))
@ -585,7 +575,7 @@ class acp_board
$method = basename($cfg_array['auth_method']); $method = basename($cfg_array['auth_method']);
if ($method) if ($method)
{ {
$provider = $phpbb_container->get('auth.provider.' . $method); $provider = $auth_providers['auth.provider.' . $method];
if ($provider) if ($provider)
{ {
if ($error = $provider->init()) if ($error = $provider->init())
@ -683,7 +673,7 @@ class acp_board
{ {
if ($method) if ($method)
{ {
$provider = $phpbb_container->get('auth.provider.' . $method); $provider = $auth_providers['auth.provider.' . $method];
if ($provider) if ($provider)
{ {
$fields = $provider->acp($this->new_config); $fields = $provider->acp($this->new_config);
@ -709,23 +699,13 @@ class acp_board
global $phpbb_root_path, $phpEx; global $phpbb_root_path, $phpEx;
$auth_plugins = array(); $auth_plugins = array();
$auth_providers = $phpbb_container->get('auth.provider_collection');
$dp = @opendir($phpbb_root_path . 'includes/auth'); foreach($auth_providers as $key => $value)
if (!$dp)
{ {
return ''; $auth_plugins[] = str_replace('auth.provider.', '', $key);
} }
while (($file = readdir($dp)) !== false)
{
if (preg_match('#^auth_(.*?)\.' . $phpEx . '$#', $file))
{
$auth_plugins[] = preg_replace('#^auth_(.*?)\.' . $phpEx . '$#', '\1', $file);
}
}
closedir($dp);
sort($auth_plugins); sort($auth_plugins);
$auth_select = ''; $auth_select = '';