mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[feature/auth-refactor] Fix indentation on acp_board
PHPBB3-9734
This commit is contained in:
parent
3c394aee62
commit
08614e2b85
1 changed files with 38 additions and 41 deletions
|
@ -529,51 +529,48 @@ class acp_board
|
||||||
$old_auth_config = array();
|
$old_auth_config = array();
|
||||||
foreach ($auth_providers as $provider)
|
foreach ($auth_providers as $provider)
|
||||||
{
|
{
|
||||||
if ($fields = $provider->acp($this->new_config))
|
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
|
||||||
|
foreach ($fields['config'] as $field)
|
||||||
|
{
|
||||||
|
if (!isset($config[$field]))
|
||||||
{
|
{
|
||||||
// Check if we need to create config fields for this plugin and save config when submit was pressed
|
set_config($field, '');
|
||||||
foreach ($fields['config'] as $field)
|
|
||||||
{
|
|
||||||
if (!isset($config[$field]))
|
|
||||||
{
|
|
||||||
set_config($field, '');
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
$old_auth_config[$field] = $this->new_config[$field];
|
|
||||||
$config_value = $cfg_array[$field];
|
|
||||||
$this->new_config[$field] = $config_value;
|
|
||||||
|
|
||||||
if ($submit)
|
|
||||||
{
|
|
||||||
$updated_auth_settings = true;
|
|
||||||
set_config($field, $config_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
unset($fields);
|
|
||||||
|
if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
$old_auth_config[$field] = $this->new_config[$field];
|
||||||
|
$config_value = $cfg_array[$field];
|
||||||
|
$this->new_config[$field] = $config_value;
|
||||||
|
|
||||||
|
if ($submit)
|
||||||
|
{
|
||||||
|
$updated_auth_settings = true;
|
||||||
|
set_config($field, $config_value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
unset($fields);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
|
if ($submit && (($cfg_array['auth_method'] != $this->new_config['auth_method']) || $updated_auth_settings))
|
||||||
{
|
{
|
||||||
$method = basename($cfg_array['auth_method']);
|
$method = basename($cfg_array['auth_method']);
|
||||||
if ($method)
|
if (array_key_exists('auth.provider.' . $method, $auth_providers))
|
||||||
{
|
{
|
||||||
$provider = $auth_providers['auth.provider.' . $method];
|
$provider = $auth_providers['auth.provider.' . $method];
|
||||||
if ($provider)
|
if ($error = $provider->init())
|
||||||
{
|
{
|
||||||
if ($error = $provider->init())
|
foreach ($old_auth_config as $config_name => $config_value)
|
||||||
{
|
{
|
||||||
foreach ($old_auth_config as $config_name => $config_value)
|
set_config($config_name, $config_value);
|
||||||
{
|
|
||||||
set_config($config_name, $config_value);
|
|
||||||
}
|
|
||||||
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
|
|
||||||
}
|
}
|
||||||
|
trigger_error($error . adm_back_link($this->u_action), E_USER_WARNING);
|
||||||
}
|
}
|
||||||
set_config('auth_method', basename($cfg_array['auth_method']));
|
set_config('auth_method', basename($cfg_array['auth_method']));
|
||||||
}
|
}
|
||||||
|
@ -659,15 +656,15 @@ class acp_board
|
||||||
|
|
||||||
foreach ($auth_provider as $provider)
|
foreach ($auth_provider as $provider)
|
||||||
{
|
{
|
||||||
$fields = $provider->acp($this->new_config);
|
$fields = $provider->acp($this->new_config);
|
||||||
|
|
||||||
if ($fields['tpl'])
|
if ($fields['tpl'])
|
||||||
{
|
{
|
||||||
$template->assign_block_vars('auth_tpl', array(
|
$template->assign_block_vars('auth_tpl', array(
|
||||||
'TPL' => $fields['tpl'])
|
'TPL' => $fields['tpl'])
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
unset($fields);
|
unset($fields);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue