mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-07 20:08:53 +00:00
[ticket/12479] Remove set_config and set_config_count
PHPBB-12479
This commit is contained in:
parent
54ba185d82
commit
06d226f292
4 changed files with 0 additions and 64 deletions
|
@ -67,8 +67,6 @@ function register_compatibility_globals()
|
|||
// Grab global variables, re-cache if necessary
|
||||
/* @var $config phpbb\config\db */
|
||||
$config = $phpbb_container->get('config');
|
||||
set_config('', '', false, $config);
|
||||
set_config_count('', 0, false, $config);
|
||||
|
||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||
$phpbb_log = $phpbb_container->get('log');
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -21,7 +21,6 @@ class phpbb_text_processing_generate_text_for_display_test extends phpbb_test_ca
|
|||
|
||||
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
|
||||
$config = new \phpbb\config\config(array());
|
||||
set_config(null, null, null, $config);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -20,7 +20,6 @@ class phpbb_text_processing_generate_text_for_storage_test extends phpbb_test_ca
|
|||
parent::setUp();
|
||||
|
||||
$config = new \phpbb\config\config(array());
|
||||
set_config(null, null, null, $config);
|
||||
|
||||
$phpbb_container = new phpbb_mock_container_builder;
|
||||
$phpbb_container->set('config', $config);
|
||||
|
|
Loading…
Add table
Reference in a new issue