moved cache, db, logs, and sessions to the storage directory.
This commit is contained in:
@@ -10,7 +10,7 @@ class File implements \System\Session\Driver {
|
||||
*/
|
||||
public function load($id)
|
||||
{
|
||||
if (file_exists($path = APP_PATH.'sessions/'.$id))
|
||||
if (file_exists($path = APP_PATH.'storage/sessions/'.$id))
|
||||
{
|
||||
return unserialize(file_get_contents($path));
|
||||
}
|
||||
@@ -24,7 +24,7 @@ class File implements \System\Session\Driver {
|
||||
*/
|
||||
public function save($session)
|
||||
{
|
||||
file_put_contents(APP_PATH.'sessions/'.$session['id'], serialize($session), LOCK_EX);
|
||||
file_put_contents(APP_PATH.'storage/sessions/'.$session['id'], serialize($session), LOCK_EX);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -35,7 +35,7 @@ class File implements \System\Session\Driver {
|
||||
*/
|
||||
public function delete($id)
|
||||
{
|
||||
@unlink(APP_PATH.'sessions/'.$id);
|
||||
@unlink(APP_PATH.'storage/sessions/'.$id);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ class File implements \System\Session\Driver {
|
||||
*/
|
||||
public function sweep($expiration)
|
||||
{
|
||||
foreach (glob(APP_PATH.'sessions/*') as $file)
|
||||
foreach (glob(APP_PATH.'storage/sessions/*') as $file)
|
||||
{
|
||||
if (filetype($file) == 'file' and filemtime($file) < $expiration)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user