mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 14:18:52 +00:00
[ticket/10139] Make signatures of set_atomic() consistent by using $new_value.
PHPBB3-10139
This commit is contained in:
parent
9241aa79ff
commit
2701a587ac
1 changed files with 3 additions and 3 deletions
|
@ -135,16 +135,16 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
|
||||||
*
|
*
|
||||||
* @param string $key The configuration option's name
|
* @param string $key The configuration option's name
|
||||||
* @param string $old_value Current configuration value
|
* @param string $old_value Current configuration value
|
||||||
* @param string $value New configuration value
|
* @param string $new_value New configuration value
|
||||||
* @param bool $use_cache Whether this variable should be cached or if it
|
* @param bool $use_cache Whether this variable should be cached or if it
|
||||||
* changes too frequently to be efficiently cached.
|
* changes too frequently to be efficiently cached.
|
||||||
* @return bool True if the value was changed, false otherwise.
|
* @return bool True if the value was changed, false otherwise.
|
||||||
*/
|
*/
|
||||||
public function set_atomic($key, $old_value, $value, $use_cache = true)
|
public function set_atomic($key, $old_value, $new_value, $use_cache = true)
|
||||||
{
|
{
|
||||||
if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
|
if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
|
||||||
{
|
{
|
||||||
$this->config[$key] = $value;
|
$this->config[$key] = $new_value;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Add table
Reference in a new issue