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/libraries | |
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/libraries')
-rw-r--r-- | system/libraries/Session/Session.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index 659a0269e..19de97994 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -102,10 +102,10 @@ class CI_Session extends CI_Driver_Library { */ public function __construct(array $params = array()) { - $CI =& get_instance(); + $_config =& get_instance()->config; // No sessions under CLI - if ($CI->input->is_cli_request()) + if (is_cli()) { return; } @@ -113,7 +113,7 @@ class CI_Session extends CI_Driver_Library { log_message('debug', 'CI_Session Class Initialized'); // Add possible extra entries to our valid drivers list - $drivers = isset($params['sess_valid_drivers']) ? $params['sess_valid_drivers'] : $CI->config->item('sess_valid_drivers'); + $drivers = isset($params['sess_valid_drivers']) ? $params['sess_valid_drivers'] : $_config->item('sess_valid_drivers'); if ( ! empty($drivers)) { $drivers = array_map('strtolower', (array) $drivers); @@ -121,7 +121,7 @@ class CI_Session extends CI_Driver_Library { } // Get driver to load - $driver = isset($params['sess_driver']) ? $params['sess_driver'] : $CI->config->item('sess_driver'); + $driver = isset($params['sess_driver']) ? $params['sess_driver'] : $_config->item('sess_driver'); if ( ! $driver) { log_message('debug', "Session: No driver name is configured, defaulting to 'cookie'."); |