From f4707962617cebb0fbc8c3bb13a29ddc11fa2d54 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 10:30:19 -0500 Subject: [PATCH] Refactor the file session driver. --- system/session/file.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/system/session/file.php b/system/session/file.php index df268569..3cc27e41 100644 --- a/system/session/file.php +++ b/system/session/file.php @@ -10,10 +10,7 @@ class File implements Driver, Sweeper { */ public function load($id) { - if (file_exists($path = SESSION_PATH.$id)) - { - return unserialize(file_get_contents($path)); - } + if (file_exists($path = SESSION_PATH.$id)) return unserialize(file_get_contents($path)); } /** @@ -48,10 +45,7 @@ class File implements Driver, Sweeper { { foreach (glob(SESSION_PATH.'*') as $file) { - if (filetype($file) == 'file' and filemtime($file) < $expiration) - { - @unlink($file); - } + if (filetype($file) == 'file' and filemtime($file) < $expiration) @unlink($file); } }