phpBB

Code Changes

File: includes/acp/acp_board.php

  Unmodified   Added   Modified   Removed
Line 449Line 449

'legend2' => 'SMTP_SETTINGS',
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),


'legend2' => 'SMTP_SETTINGS',
'smtp_delivery' => array('lang' => 'USE_SMTP', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),

						'smtp_host'				=> array('lang' => 'SMTP_SERVER',			'validate' => 'string',	'type' => 'text:25:50', 'explain' => false),

						'smtp_host'				=> array('lang' => 'SMTP_SERVER',			'validate' => 'string',	'type' => 'text:25:50', 'explain' => true),

						'smtp_port'				=> array('lang' => 'SMTP_PORT',				'validate' => 'int:0:99999',	'type' => 'number:0:99999', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),

						'smtp_port'				=> array('lang' => 'SMTP_PORT',				'validate' => 'int:0:99999',	'type' => 'number:0:99999', 'explain' => true),
'smtp_auth_method' => array('lang' => 'SMTP_AUTH_METHOD', 'validate' => 'string', 'type' => 'select', 'method' => 'mail_auth_select', 'explain' => true),
'smtp_username' => array('lang' => 'SMTP_USERNAME', 'validate' => 'string', 'type' => 'text:25:255', 'explain' => true),

Line 500Line 500
		}

// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...

		}

// We go through the display_vars to make sure no one is trying to set variables he/she is not allowed to...

		foreach ($display_vars['vars'] as $config_name => $null)

		foreach ($display_vars['vars'] as $config_name => $data)

		{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{

		{
if (!isset($cfg_array[$config_name]) || strpos($config_name, 'legend') !== false)
{

Line 514Line 514

if ($config_name == 'guest_style')
{


if ($config_name == 'guest_style')
{

				if (isset($cfg_array[$config_name])) {


				if (isset($cfg_array[$config_name]))
{

					$this->guest_style_set($cfg_array[$config_name]);
}
continue;

					$this->guest_style_set($cfg_array[$config_name]);
}
continue;

Line 531Line 532

if ($submit)
{


if ($submit)
{

 
				if (strpos($data['type'], 'password') === 0 && $config_value === '********')
{
// Do not update password fields if the content is ********,
// because that is the password replacement we use to not
// send the password to the output
continue;
}

				set_config($config_name, $config_value);

if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))

				set_config($config_name, $config_value);

if ($config_name == 'allow_quick_reply' && isset($_POST['allow_quick_reply_enable']))

Line 559Line 567
			$old_auth_config = array();
foreach ($auth_providers as $provider)
{

			$old_auth_config = array();
foreach ($auth_providers as $provider)
{

 
				/** @var \phpbb\auth\provider\provider_interface $provider */

				if ($fields = $provider->acp())
{
// Check if we need to create config fields for this plugin and save config when submit was pressed

				if ($fields = $provider->acp())
{
// Check if we need to create config fields for this plugin and save config when submit was pressed

Line 571Line 580

if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
{


if (!isset($cfg_array[$field]) || strpos($field, 'legend') !== false)
{

 
							continue;
}

if (substr($field, -9) === '_password' && $cfg_array[$field] === '********')
{
// Do not update password fields if the content is ********,
// because that is the password replacement we use to not
// send the password to the output

							continue;
}


							continue;
}


Line 615Line 632
		{
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));


		{
add_log('admin', 'LOG_CONFIG_' . strtoupper($mode));


			trigger_error($user->lang['CONFIG_UPDATED'] . adm_back_link($this->u_action));









			$message = $user->lang('CONFIG_UPDATED');
$message_type = E_USER_NOTICE;
if (!$config['email_enable'] && in_array($mode, array('email', 'registration')) &&
in_array($config['require_activation'], array(USER_ACTIVATION_SELF, USER_ACTIVATION_ADMIN)))
{
$message .= '<br /><br />' . $user->lang('ACC_ACTIVATION_WARNING');
$message_type = E_USER_WARNING;
}
trigger_error($message . adm_back_link($this->u_action), $message_type);

		}

$this->tpl_name = 'acp_board';

		}

$this->tpl_name = 'acp_board';

Line 792Line 817
		global $user, $config;

$act_ary = array(

		global $user, $config;

$act_ary = array(

			'ACC_DISABLE' => USER_ACTIVATION_DISABLE,
'ACC_NONE' => USER_ACTIVATION_NONE,



			'ACC_DISABLE'	=> array(true, USER_ACTIVATION_DISABLE),
'ACC_NONE' => array(true, USER_ACTIVATION_NONE),
'ACC_USER' => array($config['email_enable'], USER_ACTIVATION_SELF),
'ACC_ADMIN' => array($config['email_enable'], USER_ACTIVATION_ADMIN),

		);

		);

		if ($config['email_enable'])
{
$act_ary['ACC_USER'] = USER_ACTIVATION_SELF;
$act_ary['ACC_ADMIN'] = USER_ACTIVATION_ADMIN;
}







		$act_options = '';

		$act_options = '';


foreach ($act_ary as $key => $value)

		foreach ($act_ary as $key => $data)


		{

		{

 
			list($available, $value) = $data;

			$selected = ($selected_value == $value) ? ' selected="selected"' : '';

			$selected = ($selected_value == $value) ? ' selected="selected"' : '';

			$act_options .= '<option value="' . $value . '"' . $selected . '>' . $user->lang[$key] . '</option>';


			$class = (!$available) ? ' class="disabled-option"' : '';
$act_options .= '<option value="' . $value . '"' . $selected . $class . '>' . $user->lang($key) . '</option>';

		}

return $act_options;

		}

return $act_options;

Line 818Line 842
	{
global $user;


	{
global $user;


		return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" size="3" maxlength="3" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];

		return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_name_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" min="8" max="180" name="config[max_name_chars]" value="' . $this->new_config['max_name_chars'] . '" /> ' . $user->lang['MAX_CHARS'];

	}

/**

	}

/**

Line 846Line 870
	{
global $user;


	{
global $user;


		return '<input id="' . $key . '" type="number" size="3" maxlength="3" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" size="3" maxlength="3" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];

		return '<input id="' . $key . '" type="number" min="1" max="999" name="config[min_pass_chars]" value="' . $value . '" /> ' . $user->lang['MIN_CHARS'] . '&nbsp;&nbsp;<input type="number" min="8" max="255" name="config[max_pass_chars]" value="' . $this->new_config['max_pass_chars'] . '" /> ' . $user->lang['MAX_CHARS'];

	}

/**

	}

/**