diff options
author | Andrey Andreev <narf@devilix.net> | 2013-11-12 16:04:55 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2013-11-12 16:04:55 +0100 |
commit | f964b16f3db95d655420dfae2012ee9fbb98a1a8 (patch) | |
tree | a3a2acf87bf15604da653c67e1a348097225f817 /system/core/Input.php | |
parent | 35e3b0bc4f723b938160da87aeb5ad9e054507c4 (diff) |
Deprecate CI_Input::is_cli_request() and add common function is_cli() to replace it
Calls to this function are often needed before the Input library is available
Diffstat (limited to 'system/core/Input.php')
-rw-r--r-- | system/core/Input.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/core/Input.php b/system/core/Input.php index 8c32e459e..384e30d43 100644 --- a/system/core/Input.php +++ b/system/core/Input.php @@ -708,7 +708,7 @@ class CI_Input { $_SERVER['PHP_SELF'] = strip_tags($_SERVER['PHP_SELF']); // CSRF Protection check - if ($this->_enable_csrf === TRUE && ! $this->is_cli_request()) + if ($this->_enable_csrf === TRUE && ! is_cli()) { $this->security->csrf_verify(); } @@ -901,11 +901,12 @@ class CI_Input { * * Test to see if a request was made from the command line. * - * @return bool + * @deprecated 3.0.0 Use is_cli() instead + * @return bool */ public function is_cli_request() { - return (PHP_SAPI === 'cli' OR defined('STDIN')); + return is_cli(); } // -------------------------------------------------------------------- |