From e86603fb4eb218077e255d76a638a3e545e2fd0c Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Wed, 11 Jun 2014 14:03:36 +0300 Subject: [ci skip] A tiny optimization --- system/libraries/Session/Session.php | 10 +++++----- 1 file 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')) -- cgit v1.2.3-24-g4f1b