diff options
author | Gaëtan Muller <m.gaetan89@gmail.com> | 2015-01-11 18:01:52 +0100 |
---|---|---|
committer | Gaëtan Muller <m.gaetan89@gmail.com> | 2015-02-02 21:52:59 +0100 |
commit | a633f3484c63fe4bd70df548b3ae4bd569bdef46 (patch) | |
tree | 84e22d369b32d520dad249a2e8b7a13394b0a108 /phpBB/includes/functions_compatibility.php | |
parent | df77174a2b2a8f9e86ee8f992556dd4820484be3 (diff) | |
download | forums-a633f3484c63fe4bd70df548b3ae4bd569bdef46.tar forums-a633f3484c63fe4bd70df548b3ae4bd569bdef46.tar.gz forums-a633f3484c63fe4bd70df548b3ae4bd569bdef46.tar.bz2 forums-a633f3484c63fe4bd70df548b3ae4bd569bdef46.tar.xz forums-a633f3484c63fe4bd70df548b3ae4bd569bdef46.zip |
[ticket/13496] Update calls to `set_config_count()`
PHPBB3-13496
Diffstat (limited to 'phpBB/includes/functions_compatibility.php')
-rw-r--r-- | phpBB/includes/functions_compatibility.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/phpBB/includes/functions_compatibility.php b/phpBB/includes/functions_compatibility.php index 552eaaeb80..2673f74a62 100644 --- a/phpBB/includes/functions_compatibility.php +++ b/phpBB/includes/functions_compatibility.php @@ -297,3 +297,30 @@ function set_config($config_name, $config_value, $is_dynamic = false, \phpbb\con $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 null + * + * @deprecated 3.1.0 (To be removed: 3.3.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); +} |