diff options
author | Florian Pritz <bluewind@xinu.at> | 2013-08-27 11:37:52 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2013-09-02 22:02:27 +0200 |
commit | 34f63ca22b788bbacace0f5ae9d9de9aad161b48 (patch) | |
tree | ec991b3a25465070634bbebaf6e7ab17861b913a /system | |
parent | cade8e25e767a8fb2b4581badada0f24a505215a (diff) |
Allow to override config_item() options; add modification comments
Signed-off-by: Florian Pritz <bluewind@xinu.at>
Diffstat (limited to 'system')
-rwxr-xr-x | system/core/Common.php | 11 | ||||
-rwxr-xr-x | system/core/URI.php | 5 |
2 files changed, 15 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]; } } diff --git a/system/core/URI.php b/system/core/URI.php index d78c8ee49..d3c25070e 100755 --- a/system/core/URI.php +++ b/system/core/URI.php @@ -1,5 +1,10 @@ <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); /** + * MODIFIED: + * _detect_uri(): ltrim instead of trim at the end to preserve tailing slashes + */ + +/** * CodeIgniter * * An open source application development framework for PHP 5.1.6 or newer |