summaryrefslogtreecommitdiffstats
path: root/system/core/URI.php
diff options
context:
space:
mode:
authorPhil Sturgeon <email@philsturgeon.co.uk>2012-03-14 11:46:34 +0100
committerPhil Sturgeon <email@philsturgeon.co.uk>2012-03-14 11:46:34 +0100
commit0fe8c8e21315e00dbc06a87290fb268a2dc999a9 (patch)
tree4bc75acb95f49de7bf5df9ec3eb684bc39c93ad0 /system/core/URI.php
parentca6404749a8dd3ee5dd68d64832374dce05fe6a3 (diff)
parent62c0647d241d556590d470ea27ac9aa36f609bfa (diff)
Merge branch 'feature/unit-tests' into develop
Diffstat (limited to 'system/core/URI.php')
-rwxr-xr-xsystem/core/URI.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/system/core/URI.php b/system/core/URI.php
index db5b8e44b..b5364a30d 100755
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -22,7 +22,6 @@
* @license http://opensource.org/licenses/OSL-3.0 Open Software License (OSL 3.0)
* @link http://codeigniter.com
* @since Version 1.0
- * @filesource
*/
// ------------------------------------------------------------------------
@@ -93,7 +92,7 @@ class CI_URI {
if (strtoupper($this->config->item('uri_protocol')) === 'AUTO')
{
// Is the request coming from the command line?
- if (php_sapi_name() === 'cli' OR defined('STDIN'))
+ if ($this->_is_cli_request())
{
$this->_set_uri_string($this->_parse_cli_args());
return;
@@ -227,6 +226,21 @@ class CI_URI {
}
// --------------------------------------------------------------------
+
+ /**
+ * Is cli Request?
+ *
+ * Duplicate of function from the Input class to test to see if a request was made from the command line
+ *
+ * @return boolean
+ */
+ protected function _is_cli_request()
+ {
+ return (php_sapi_name() == 'cli') OR defined('STDIN');
+ }
+
+
+ // --------------------------------------------------------------------
/**
* Parse cli arguments