summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authordchill42 <dchill42@gmail.com>2012-07-24 17:50:01 +0200
committerdchill42 <dchill42@gmail.com>2012-07-24 17:50:01 +0200
commit77ee3fdac34d317b600a269e0b845588c88fa4c5 (patch)
tree4f1d9a33c60bfde22bb376af30c7b2cd34801fdc /system
parent42b77a9a1a5d4ec7ceb94b421b12af9c442769ba (diff)
Cleaned up bangs and lowercase booleans, and fixed userdata return on not found to NULL
Diffstat (limited to 'system')
-rwxr-xr-xsystem/libraries/Session/Session.php18
-rwxr-xr-xsystem/libraries/Session/drivers/Session_cookie.php2
-rwxr-xr-xsystem/libraries/Session/drivers/Session_native.php4
3 files changed, 12 insertions, 12 deletions
diff --git a/system/libraries/Session/Session.php b/system/libraries/Session/Session.php
index 474ca9c7a..9c887d88e 100755
--- a/system/libraries/Session/Session.php
+++ b/system/libraries/Session/Session.php
@@ -69,12 +69,12 @@ class CI_Session extends CI_Driver_Library {
$drivers = (isset($params[$key])) ? $params[$key] : $CI->config->item($key);
if ($drivers)
{
- if (!is_array($drivers)) $drivers = array($drivers);
+ if ( ! is_array($drivers)) $drivers = array($drivers);
// Add driver names to valid list
foreach ($drivers as $driver)
{
- if (!in_array(strtolower($driver), array_map('strtolower', $this->valid_drivers)))
+ if ( ! in_array(strtolower($driver), array_map('strtolower', $this->valid_drivers)))
{
$this->valid_drivers[] = $driver;
}
@@ -84,8 +84,8 @@ class CI_Session extends CI_Driver_Library {
// Get driver to load
$key = 'sess_driver';
$driver = (isset($params[$key])) ? $params[$key] : $CI->config->item($key);
- if (!$driver) $driver = 'cookie';
- if (!in_array('session_'.strtolower($driver), array_map('strtolower', $this->valid_drivers)))
+ if ( ! $driver) $driver = 'cookie';
+ if ( ! in_array('session_'.strtolower($driver), array_map('strtolower', $this->valid_drivers)))
{
$this->valid_drivers[] = 'Session_'.$driver;
}
@@ -182,7 +182,7 @@ class CI_Session extends CI_Driver_Library {
public function userdata($item)
{
// Return value or FALSE if not found
- return (!isset($this->userdata[$item])) ? FALSE : $this->userdata[$item];
+ return ( ! isset($this->userdata[$item])) ? NULL : $this->userdata[$item];
}
/**
@@ -193,7 +193,7 @@ class CI_Session extends CI_Driver_Library {
public function all_userdata()
{
// Return entire array
- return (!isset($this->userdata)) ? FALSE : $this->userdata;
+ return ( ! isset($this->userdata)) ? NULL : $this->userdata;
}
/**
@@ -362,7 +362,7 @@ class CI_Session extends CI_Driver_Library {
// Get or create expiration list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations)
+ if ( ! $expirations)
{
$expirations = array();
}
@@ -392,7 +392,7 @@ class CI_Session extends CI_Driver_Library {
{
// Get expirations list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations || !count($expirations))
+ if ( ! $expirations || ! count($expirations))
{
// Nothing to do
return;
@@ -482,7 +482,7 @@ class CI_Session extends CI_Driver_Library {
{
// Get expirations list
$expirations = $this->userdata(self::EXPIRATION_KEY);
- if (!$expirations || !count($expirations))
+ if ( ! $expirations || ! count($expirations))
{
// Nothing to do
return;
diff --git a/system/libraries/Session/drivers/Session_cookie.php b/system/libraries/Session/drivers/Session_cookie.php
index 255a1ae3e..e39ada052 100755
--- a/system/libraries/Session/drivers/Session_cookie.php
+++ b/system/libraries/Session/drivers/Session_cookie.php
@@ -516,7 +516,7 @@ class CI_Session_cookie extends CI_Session_driver {
protected function _sess_update($force = FALSE)
{
// We only update the session every five minutes by default (unless forced)
- if (!$force && ($this->userdata['last_activity'] + $this->sess_time_to_update) >= $this->now)
+ if ( ! $force && ($this->userdata['last_activity'] + $this->sess_time_to_update) >= $this->now)
{
return;
}
diff --git a/system/libraries/Session/drivers/Session_native.php b/system/libraries/Session/drivers/Session_native.php
index 7fbe9f89e..8388e06b5 100755
--- a/system/libraries/Session/drivers/Session_native.php
+++ b/system/libraries/Session/drivers/Session_native.php
@@ -161,10 +161,10 @@ class CI_Session_native extends CI_Session_driver {
* Regenerate the session id
*
* @access public
- * @param boolean Destroy session data flag (default: false)
+ * @param boolean Destroy session data flag (default: FALSE)
* @return void
*/
- public function sess_regenerate($destroy = false)
+ public function sess_regenerate($destroy = FALSE)
{
// Just regenerate id, passing destroy flag
session_regenerate_id($destroy);