summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/CodeIgniter.php2
-rw-r--r--system/core/Input.php2
-rw-r--r--system/core/Loader.php15
-rw-r--r--system/core/URI.php2
4 files changed, 18 insertions, 3 deletions
diff --git a/system/core/CodeIgniter.php b/system/core/CodeIgniter.php
index 03b25ab9e..94fecb5c0 100644
--- a/system/core/CodeIgniter.php
+++ b/system/core/CodeIgniter.php
@@ -32,7 +32,7 @@
* Define the CodeIgniter Version
* ------------------------------------------------------
*/
- define('CI_VERSION', '2.0.2');
+ define('CI_VERSION', '2.0.3');
/*
* ------------------------------------------------------
diff --git a/system/core/Input.php b/system/core/Input.php
index dc7612e64..cfbef942d 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -672,7 +672,7 @@ class CI_Input {
*/
public function is_cli_request()
{
- return (bool) defined('STDIN');
+ return (php_sapi_name() == 'cli') or defined('STDIN');
}
}
diff --git a/system/core/Loader.php b/system/core/Loader.php
index 721c196cc..7c8b298ac 100644
--- a/system/core/Loader.php
+++ b/system/core/Loader.php
@@ -389,6 +389,21 @@ class CI_Loader {
// --------------------------------------------------------------------
/**
+ * Get Variable
+ *
+ * Check if a variable is set and retrieve it.
+ *
+ * @param array
+ * @return void
+ */
+ public function get_var($key)
+ {
+ return isset($this->_ci_cached_vars[$key]) ? $this->_ci_cached_vars[$key] : NULL;
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Load Helper
*
* This function loads the specified helper file.
diff --git a/system/core/URI.php b/system/core/URI.php
index d56548654..20f0f006b 100644
--- a/system/core/URI.php
+++ b/system/core/URI.php
@@ -62,7 +62,7 @@ class CI_URI {
if (strtoupper($this->config->item('uri_protocol')) == 'AUTO')
{
// Is the request coming from the command line?
- if (defined('STDIN'))
+ if (php_sapi_name() == 'cli' or defined('STDIN'))
{
$this->_set_uri_string($this->_parse_cli_args());
return;