1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 08:17:47 +02:00

Merge pull request #3281 from MGaetan89/ticket/13496

[ticket/13496] Change set_config_count() calls with $config->increment()

* MGaetan89/ticket/13496:
  [ticket/13496] Update calls to `set_config_count()`
This commit is contained in:
Andreas Fischer
2015-02-03 18:13:20 +01:00
20 changed files with 52 additions and 67 deletions

View File

@@ -129,36 +129,6 @@ function request_var($var_name, $default, $multibyte = false, $cookie = false, $
return $tmp_request->variable($var_name, $default, $multibyte, ($cookie) ? \phpbb\request\request_interface::COOKIE : \phpbb\request\request_interface::REQUEST);
}
/**
* 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
*/
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);
}
/**
* Generates an alphanumeric random string of given length
*