mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-20 07:21:30 +02:00
- add support for min/max of numerical search backend settings
- change word_text maximum length - don't update search settings if nothing was changed git-svn-id: file:///svn/phpbb/trunk@5993 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -99,10 +99,24 @@ class acp_search
|
||||
continue;
|
||||
}
|
||||
|
||||
$config_value = $cfg_array[$config_name];
|
||||
settype($config_value, $var_type);
|
||||
// e.g. integer:4:12 (min 4, max 12)
|
||||
$var_type = explode(':', $var_type);
|
||||
|
||||
if ($submit)
|
||||
$config_value = $cfg_array[$config_name];
|
||||
settype($config_value, $var_type[0]);
|
||||
|
||||
if (isset($var_type[1]))
|
||||
{
|
||||
$config_value = max($var_type[1], $config_value);
|
||||
}
|
||||
|
||||
if (isset($var_type[2]))
|
||||
{
|
||||
$config_value = min($var_type[2], $config_value);
|
||||
}
|
||||
|
||||
// only change config if anything was actually changed
|
||||
if ($submit && ($config[$config_name] != $config_value))
|
||||
{
|
||||
set_config($config_name, $config_value);
|
||||
$updated = true;
|
||||
|
Reference in New Issue
Block a user