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 | 11 | ||||
-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, 17 insertions, 3 deletions
diff --git a/system/core/Benchmark.php b/system/core/Benchmark.php index a200727ab..a200727ab 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 e0819c801..e0819c801 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 07534c51f..f8d80b957 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 @@ -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/Config.php b/system/core/Config.php index 5dffbf3f2..5dffbf3f2 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 869739a5a..869739a5a 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 33f1c034c..33f1c034c 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 0c1f2b08e..0c1f2b08e 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 5ac671838..5ac671838 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 e15ffbebc..e15ffbebc 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 ccecafd2b..ccecafd2b 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 6da667472..6da667472 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 b0d39b981..b0d39b981 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 a3ae20cc3..d3c25070e 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 */ |