aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/config/config.php
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes/config/config.php')
-rw-r--r--phpBB/includes/config/config.php35
1 files changed, 24 insertions, 11 deletions
diff --git a/phpBB/includes/config/config.php b/phpBB/includes/config/config.php
index 64fef28cfa..354dc85c03 100644
--- a/phpBB/includes/config/config.php
+++ b/phpBB/includes/config/config.php
@@ -104,14 +104,27 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
}
/**
+ * Removes a configuration option
+ *
+ * @param String $key The configuration option's name
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached
+ * @return void
+ */
+ public function delete($key, $use_cache = true)
+ {
+ unset($this->config[$key]);
+ }
+
+ /**
* Sets a configuration option's value
*
- * @param string $key The configuration option's name
- * @param string $value New configuration value
- * @param bool $cache Whether this variable should be cached or if it
- * changes too frequently to be efficiently cached.
+ * @param string $key The configuration option's name
+ * @param string $value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
+ * changes too frequently to be efficiently cached.
*/
- public function set($key, $value, $cache = true)
+ public function set($key, $value, $use_cache = true)
{
$this->config[$key] = $value;
}
@@ -122,16 +135,16 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
*
* @param string $key The configuration option's name
* @param string $old_value Current configuration value
- * @param string $value New configuration value
- * @param bool $cache Whether this variable should be cached or if it
+ * @param string $new_value New configuration value
+ * @param bool $use_cache Whether this variable should be cached or if it
* changes too frequently to be efficiently cached.
* @return bool True if the value was changed, false otherwise.
*/
- public function set_atomic($key, $old_value, $value, $cache = true)
+ public function set_atomic($key, $old_value, $new_value, $use_cache = true)
{
if (!isset($this->config[$key]) || $this->config[$key] == $old_value)
{
- $this->config[$key] = $value;
+ $this->config[$key] = $new_value;
return true;
}
return false;
@@ -142,10 +155,10 @@ class phpbb_config implements ArrayAccess, IteratorAggregate, Countable
*
* @param string $key The configuration option's name
* @param int $increment Amount to increment by
- * @param bool $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.
*/
- function increment($key, $increment, $cache = true)
+ function increment($key, $increment, $use_cache = true)
{
if (!isset($this->config[$key]))
{