Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
syncEnrollments
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yeray Santana Hualde
syncEnrollments
Commits
739068b0
Commit
739068b0
authored
Jun 25, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
moved cache, db, logs, and sessions to the storage directory.
parent
3985a98f
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
10 additions
and
10 deletions
+10
-10
.gitignore
application/storage/cache/.gitignore
+0
-0
.gitignore
application/storage/db/.gitignore
+0
-0
.gitignore
application/storage/logs/.gitignore
+0
-0
.gitignore
application/storage/sessions/.gitignore
+0
-0
file.php
system/cache/driver/file.php
+4
-4
connector.php
system/db/connector.php
+1
-1
log.php
system/log.php
+1
-1
file.php
system/session/driver/file.php
+4
-4
No files found.
application/cache/.gitignore
→
application/
storage/
cache/.gitignore
View file @
739068b0
File moved
application/db/.gitignore
→
application/
storage/
db/.gitignore
View file @
739068b0
File moved
application/logs/.gitignore
→
application/
storage/
logs/.gitignore
View file @
739068b0
File moved
application/sessions/.gitignore
→
application/s
torage/s
essions/.gitignore
View file @
739068b0
File moved
system/cache/driver/file.php
View file @
739068b0
...
...
@@ -34,12 +34,12 @@ class File implements \System\Cache\Driver {
return
$this
->
items
[
$key
];
}
if
(
!
file_exists
(
APP_PATH
.
'cache/'
.
$key
))
if
(
!
file_exists
(
APP_PATH
.
'
storage/
cache/'
.
$key
))
{
return
$default
;
}
$cache
=
file_get_contents
(
APP_PATH
.
'cache/'
.
$key
);
$cache
=
file_get_contents
(
APP_PATH
.
'
storage/
cache/'
.
$key
);
// --------------------------------------------------
// Has the cache expired? The UNIX expiration time
...
...
@@ -65,7 +65,7 @@ class File implements \System\Cache\Driver {
*/
public
function
put
(
$key
,
$value
,
$minutes
)
{
file_put_contents
(
APP_PATH
.
'cache/'
.
$key
,
(
time
()
+
(
$minutes
*
60
))
.
serialize
(
$value
),
LOCK_EX
);
file_put_contents
(
APP_PATH
.
'
storage/
cache/'
.
$key
,
(
time
()
+
(
$minutes
*
60
))
.
serialize
(
$value
),
LOCK_EX
);
}
/**
...
...
@@ -76,7 +76,7 @@ class File implements \System\Cache\Driver {
*/
public
function
forget
(
$key
)
{
@
unlink
(
APP_PATH
.
'cache/'
.
$key
);
@
unlink
(
APP_PATH
.
'
storage/
cache/'
.
$key
);
}
}
\ No newline at end of file
system/db/connector.php
View file @
739068b0
...
...
@@ -33,7 +33,7 @@ class Connector {
// If the database doesn't exist there, maybe the full
// path was specified as the database name?
// -----------------------------------------------------
if
(
file_exists
(
$path
=
APP_PATH
.
'db/'
.
$config
->
database
.
'.sqlite'
))
if
(
file_exists
(
$path
=
APP_PATH
.
'
storage/
db/'
.
$config
->
database
.
'.sqlite'
))
{
return
new
\PDO
(
'sqlite:'
.
$path
,
null
,
null
,
static
::
$options
);
}
...
...
system/log.php
View file @
739068b0
...
...
@@ -47,7 +47,7 @@ class Log {
// -----------------------------------------------------
// Create the yearly and monthly directories if needed.
// -----------------------------------------------------
static
::
make_directory
(
$directory
=
APP_PATH
.
'logs/'
.
date
(
'Y'
));
static
::
make_directory
(
$directory
=
APP_PATH
.
'
storage/
logs/'
.
date
(
'Y'
));
static
::
make_directory
(
$directory
.=
'/'
.
date
(
'm'
));
// -----------------------------------------------------
...
...
system/session/driver/file.php
View file @
739068b0
...
...
@@ -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
.
's
torage/s
essions/'
.
$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
.
's
torage/s
essions/'
.
$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
.
's
torage/s
essions/'
.
$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
.
's
torage/s
essions/*'
)
as
$file
)
{
if
(
filetype
(
$file
)
==
'file'
and
filemtime
(
$file
)
<
$expiration
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment