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
825e8b2d
Commit
825e8b2d
authored
Apr 06, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleaning up code and comments.
parent
a77196db
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
11 deletions
+8
-11
cookie.php
laravel/session/drivers/cookie.php
+5
-7
driver.php
laravel/session/drivers/driver.php
+1
-1
payload.php
laravel/session/payload.php
+2
-3
No files found.
laravel/session/drivers/cookie.php
View file @
825e8b2d
<?php
namespace
Laravel\Session\Drivers
;
use
Laravel\Crypter
;
<?php
namespace
Laravel\Session\Drivers
;
use
Laravel\Crypter
,
Laravel\Cookie
as
C
;
class
Cookie
extends
Driver
{
...
...
@@ -21,9 +19,9 @@ class Cookie extends Driver {
*/
public
function
load
(
$id
)
{
if
(
\Laravel\Cookie
::
has
(
Cookie
::
payload
))
if
(
C
::
has
(
Cookie
::
payload
))
{
return
unserialize
(
Crypter
::
decrypt
(
\Laravel\Cookie
::
get
(
Cookie
::
payload
)));
return
unserialize
(
Crypter
::
decrypt
(
C
::
get
(
Cookie
::
payload
)));
}
}
...
...
@@ -41,7 +39,7 @@ class Cookie extends Driver {
$payload
=
Crypter
::
encrypt
(
serialize
(
$session
));
\Laravel\Cookie
::
put
(
Cookie
::
payload
,
$payload
,
$lifetime
,
$path
,
$domain
);
C
::
put
(
Cookie
::
payload
,
$payload
,
$lifetime
,
$path
,
$domain
);
}
/**
...
...
@@ -52,7 +50,7 @@ class Cookie extends Driver {
*/
public
function
delete
(
$id
)
{
\Laravel\Cookie
::
forget
(
Cookie
::
payload
);
C
::
forget
(
Cookie
::
payload
);
}
}
\ No newline at end of file
laravel/session/drivers/driver.php
View file @
825e8b2d
...
...
@@ -31,7 +31,7 @@ abstract class Driver {
abstract
public
function
delete
(
$id
);
/**
*
Insert a fresh session and return the payload array
.
*
Create a fresh session array with a unique ID
.
*
* @return array
*/
...
...
laravel/session/payload.php
View file @
825e8b2d
...
...
@@ -298,10 +298,9 @@ class Payload {
// session on the user's subsequent requests to the application.
$this
->
cookie
(
$config
);
// Some session drivers implement the Sweeper interface
,
meaning that
// Some session drivers implement the Sweeper interface meaning that
// they must clean up expired sessions manually. If the driver is a
// sweeper, we need to determine if garbage collection should be
// run for the request.
// sweeper, we'll calculate if we need to run garbage collection.
$sweepage
=
$config
[
'sweepage'
];
if
(
$this
->
driver
instanceof
Sweeper
and
(
mt_rand
(
1
,
$sweepage
[
1
])
<=
$sweepage
[
0
]))
...
...
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