summaryrefslogtreecommitdiffstats
path: root/system/core/URI.php
diff options
context:
space:
mode:
authorAndrey Andreev <narf@bofh.bg>2012-03-20 14:35:50 +0100
committerAndrey Andreev <narf@bofh.bg>2012-03-20 14:35:50 +0100
commit160a4e5628aba8b5e35da784ec87037e133c1f05 (patch)
tree3ceec6e888a078bfe86ebfefe2e126f9b23f384f /system/core/URI.php
parentad97736d8249240cba802d33a24b7b11e02488cf (diff)
parent820999cb0d82c80d6dc5dde133568812c8113e29 (diff)
Merge upstream branch
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 4a2e87c2a..48bb7ae3c 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