diff options
author | Andrey Andreev <narf@devilix.net> | 2014-06-11 13:03:36 +0200 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2014-06-11 13:03:36 +0200 |
commit | e86603fb4eb218077e255d76a638a3e545e2fd0c (patch) | |
tree | 1ed4fd02e95802c1e8350d52cc829a55e2b12761 /system/libraries/Session/Session.php | |
parent | ef41786a8a3e04d30fef757acd83c5ab888df88e (diff) |
[ci skip] A tiny optimization
Diffstat (limited to 'system/libraries/Session/Session.php')
-rw-r--r-- | system/libraries/Session/Session.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php index df6225e68..a5c9737f7 100644 --- a/system/libraries/Session/Session.php +++ b/system/libraries/Session/Session.php @@ -125,10 +125,11 @@ class CI_Session { if ( ! class_exists('CI_Session_driver', FALSE)) { - if (file_exists($file_path = APPPATH.'libraries/Session/Session_driver.php') OR file_exists($file_path = BASEPATH.'libraries/Session/Session_driver.php')) - { - require_once($file_path); - } + require_once( + file_exists(APPPATH.'libraries/Session/Session_driver.php') + ? APPPATH.'libraries/Session/Session_driver.php' + : BASEPATH.'libraries/Session/Session_driver.php' + ); if (file_exists($file_path = APPPATH.'libraries/Session/'.$prefix.'Session_driver.php')) { @@ -137,7 +138,6 @@ class CI_Session { } $class = 'Session_'.$driver.'_driver'; - if ( ! class_exists('CI_'.$class, FALSE)) { if (file_exists($file_path = APPPATH.'libraries/Session/drivers/'.$class.'.php') OR file_exists($file_path = BASEPATH.'libraries/Session/drivers/'.$class.'.php')) |