diff options
Diffstat (limited to 'system/core')
-rw-r--r--[-rwxr-xr-x] | system/core/Benchmark.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/CodeIgniter.php | 0 | ||||
-rw-r--r-- | system/core/Common.php | 14 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Config.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Exceptions.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Hooks.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Input.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Lang.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Model.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Output.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Router.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/Security.php | 0 | ||||
-rw-r--r--[-rwxr-xr-x] | system/core/URI.php | 9 |
13 files changed, 19 insertions, 4 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index a5c3e999b..a5c3e999b 100755..100644 --- a/system/core/Benchmark.php +++ b/system/core/Benchmark.php diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php index 34078174a..34078174a 100755..100644 --- a/system/core/CodeIgniter.php +++ b/system/core/CodeIgniter.php 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]; } } diff --git a/system/core/Config.php b/system/core/Config.php index 46ed9365c..46ed9365c 100755..100644 --- a/system/core/Config.php +++ b/system/core/Config.php diff --git a/system/core/Exceptions.php b/system/core/Exceptions.php index 451209689..451209689 100755..100644 --- a/system/core/Exceptions.php +++ b/system/core/Exceptions.php diff --git a/system/core/Hooks.php b/system/core/Hooks.php index ee5c23076..ee5c23076 100755..100644 --- a/system/core/Hooks.php +++ b/system/core/Hooks.php diff --git a/system/core/Input.php b/system/core/Input.php index 88afa8c7e..88afa8c7e 100755..100644 --- a/system/core/Input.php +++ b/system/core/Input.php diff --git a/system/core/Lang.php b/system/core/Lang.php index ef5d1080c..ef5d1080c 100755..100644 --- a/system/core/Lang.php +++ b/system/core/Lang.php diff --git a/system/core/Model.php b/system/core/Model.php index 1f142509e..1f142509e 100755..100644 --- a/system/core/Model.php +++ b/system/core/Model.php diff --git a/system/core/Output.php b/system/core/Output.php index 7959befb7..7959befb7 100755..100644 --- a/system/core/Output.php +++ b/system/core/Output.php diff --git a/system/core/Router.php b/system/core/Router.php index b48a34562..b48a34562 100755..100644 --- a/system/core/Router.php +++ b/system/core/Router.php diff --git a/system/core/Security.php b/system/core/Security.php index efa2df922..efa2df922 100755..100644 --- a/system/core/Security.php +++ b/system/core/Security.php diff --git a/system/core/URI.php b/system/core/URI.php index a2f3b23b4..3dacd6743 100755..100644 --- 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 @@ -219,7 +224,7 @@ class CI_URI { $uri = parse_url($uri, PHP_URL_PATH); // Do some final cleaning of the URI and return it - return str_replace(array('//', '../'), '/', trim($uri, '/')); + return str_replace(array('//', '../'), '/', ltrim($uri, '/')); } // -------------------------------------------------------------------- @@ -651,4 +656,4 @@ class CI_URI { // END URI Class /* End of file URI.php */ -/* Location: ./system/core/URI.php */
\ No newline at end of file +/* Location: ./system/core/URI.php */ |