mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/12479] Remove set_config and set_config_count
PHPBB-12479
This commit is contained in:
@@ -19,66 +19,6 @@ if (!defined('IN_PHPBB'))
|
||||
exit;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a configuration option's value.
|
||||
*
|
||||
* Please note that this function does not update the is_dynamic value for
|
||||
* an already existing config option.
|
||||
*
|
||||
* @param string $config_name The configuration option's name
|
||||
* @param string $config_value New configuration value
|
||||
* @param bool $is_dynamic Whether this variable should be cached (false) or
|
||||
* if it changes too frequently (true) to be
|
||||
* efficiently cached.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @deprecated 3.1.0 (To be removed: 4.0.0)
|
||||
*/
|
||||
function set_config($config_name, $config_value, $is_dynamic = false, \phpbb\config\config $set_config = null)
|
||||
{
|
||||
static $config = null;
|
||||
|
||||
if ($set_config !== null)
|
||||
{
|
||||
$config = $set_config;
|
||||
|
||||
if (empty($config_name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$config->set($config_name, $config_value, !$is_dynamic);
|
||||
}
|
||||
|
||||
/**
|
||||
* Increments an integer config value directly in the database.
|
||||
*
|
||||
* @param string $config_name The configuration option's name
|
||||
* @param int $increment Amount to increment by
|
||||
* @param bool $is_dynamic Whether this variable should be cached (false) or
|
||||
* if it changes too frequently (true) to be
|
||||
* efficiently cached.
|
||||
*
|
||||
* @return void
|
||||
*
|
||||
* @deprecated 3.1.0 (To be removed: 4.0.0)
|
||||
*/
|
||||
function set_config_count($config_name, $increment, $is_dynamic = false, \phpbb\config\config $set_config = null)
|
||||
{
|
||||
static $config = null;
|
||||
if ($set_config !== null)
|
||||
{
|
||||
$config = $set_config;
|
||||
if (empty($config_name))
|
||||
{
|
||||
return;
|
||||
}
|
||||
}
|
||||
$config->increment($config_name, $increment, !$is_dynamic);
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrapper function of \phpbb\request\request::variable which exists for backwards compatability.
|
||||
* See {@link \phpbb\request\request_interface::variable \phpbb\request\request_interface::variable} for
|
||||
|
Reference in New Issue
Block a user