summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
authorFlorian Pritz <bluewind@xinu.at>2013-08-27 11:37:52 +0200
committerFlorian Pritz <bluewind@xinu.at>2013-09-02 22:02:27 +0200
commit34f63ca22b788bbacace0f5ae9d9de9aad161b48 (patch)
treeec991b3a25465070634bbebaf6e7ab17861b913a /system/core/Common.php
parentcade8e25e767a8fb2b4581badada0f24a505215a (diff)
Allow to override config_item() options; add modification comments
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system/core/Common.php')
-rwxr-xr-xsystem/core/Common.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 07534c51f..f8d80b957 100755
--- a/system/core/Common.php
+++ b/system/core/Common.php
@@ -1,5 +1,10 @@
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
/**
+ * MODIFIED
+ * config_item(): option to override returned values
+ */
+
+/**
* CodeIgniter
*
* An open source application development framework for PHP 5.1.6 or newer
@@ -268,7 +273,7 @@ if ( ! function_exists('get_config'))
*/
if ( ! function_exists('config_item'))
{
- function config_item($item)
+ function config_item($item, $value = null)
{
static $_config_item = array();
@@ -283,6 +288,10 @@ if ( ! function_exists('config_item'))
$_config_item[$item] = $config[$item];
}
+ if ($value !== null) {
+ $_config_item[$item] = $value;
+ }
+
return $_config_item[$item];
}
}