mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +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
|
// Grab global variables, re-cache if necessary
|
||||||
/* @var $config phpbb\config\db */
|
/* @var $config phpbb\config\db */
|
||||||
$config = $phpbb_container->get('config');
|
$config = $phpbb_container->get('config');
|
||||||
set_config('', '', false, $config);
|
|
||||||
set_config_count('', 0, false, $config);
|
|
||||||
|
|
||||||
/* @var $phpbb_log \phpbb\log\log_interface */
|
/* @var $phpbb_log \phpbb\log\log_interface */
|
||||||
$phpbb_log = $phpbb_container->get('log');
|
$phpbb_log = $phpbb_container->get('log');
|
||||||
|
|
|
@ -19,66 +19,6 @@ if (!defined('IN_PHPBB'))
|
||||||
exit;
|
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.
|
* 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
|
* 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;
|
$phpbb_dispatcher = new phpbb_mock_event_dispatcher;
|
||||||
$config = new \phpbb\config\config(array());
|
$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();
|
parent::setUp();
|
||||||
|
|
||||||
$config = new \phpbb\config\config(array());
|
$config = new \phpbb\config\config(array());
|
||||||
set_config(null, null, null, $config);
|
|
||||||
|
|
||||||
$phpbb_container = new phpbb_mock_container_builder;
|
$phpbb_container = new phpbb_mock_container_builder;
|
||||||
$phpbb_container->set('config', $config);
|
$phpbb_container->set('config', $config);
|
||||||
|
|
Loading…
Add table
Reference in a new issue