summaryrefslogtreecommitdiffstats
path: root/system/core/Common.php
diff options
context:
space:
mode:
Diffstat (limited to 'system/core/Common.php')
-rw-r--r--system/core/Common.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/system/core/Common.php b/system/core/Common.php
index 713b21d85..4bf8a9ef5 100644
--- 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
@@ -254,7 +259,8 @@ if ( ! function_exists('get_config'))
}
}
- return $_config[0] =& $config;
+ $_config[0] =& $config;
+ return $_config[0];
}
}
@@ -268,7 +274,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 +289,10 @@ if ( ! function_exists('config_item'))
$_config_item[$item] = $config[$item];
}
+ if ($value !== null) {
+ $_config_item[$item] = $value;
+ }
+
return $_config_item[$item];
}
}