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
ca2c9882
Commit
ca2c9882
authored
Nov 02, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added cookie option to session configuration.
parent
8df52df8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
9 deletions
+13
-9
session.php
application/config/session.php
+11
-0
laravel.php
laravel/laravel.php
+1
-1
payload.php
laravel/session/payload.php
+1
-8
No files found.
application/config/session.php
View file @
ca2c9882
...
@@ -69,6 +69,17 @@ return array(
...
@@ -69,6 +69,17 @@ return array(
'expire_on_close'
=>
false
,
'expire_on_close'
=>
false
,
/*
|--------------------------------------------------------------------------
| Session Cookie Name
|--------------------------------------------------------------------------
|
| The name that should be given to the session cookie.
|
*/
'cookie'
=>
'laravel_session'
,
/*
/*
|--------------------------------------------------------------------------
|--------------------------------------------------------------------------
| Session Cookie Path
| Session Cookie Path
...
...
laravel/laravel.php
View file @
ca2c9882
...
@@ -31,7 +31,7 @@ if (Config::$items['session']['driver'] !== '')
...
@@ -31,7 +31,7 @@ if (Config::$items['session']['driver'] !== '')
$driver
=
IoC
::
container
()
->
core
(
'session.'
.
Config
::
$items
[
'session'
][
'driver'
]);
$driver
=
IoC
::
container
()
->
core
(
'session.'
.
Config
::
$items
[
'session'
][
'driver'
]);
if
(
!
is_null
(
$id
=
Cookie
::
get
(
Session\Payload
::
cookie
)))
if
(
!
is_null
(
$id
=
Cookie
::
get
(
Config
::
$items
[
'session'
][
'cookie'
]
)))
{
{
$payload
=
new
Session\Payload
(
$driver
->
load
(
$id
));
$payload
=
new
Session\Payload
(
$driver
->
load
(
$id
));
}
}
...
...
laravel/session/payload.php
View file @
ca2c9882
...
@@ -22,13 +22,6 @@ class Payload {
...
@@ -22,13 +22,6 @@ class Payload {
*/
*/
protected
$exists
=
true
;
protected
$exists
=
true
;
/**
* The name of the session cookie used to store the session ID.
*
* @var string
*/
const
cookie
=
'laravel_session'
;
/**
/**
* Create a new session payload instance.
* Create a new session payload instance.
*
*
...
@@ -256,7 +249,7 @@ class Payload {
...
@@ -256,7 +249,7 @@ class Payload {
$minutes
=
(
!
$config
[
'expire_on_close'
])
?
$config
[
'lifetime'
]
:
0
;
$minutes
=
(
!
$config
[
'expire_on_close'
])
?
$config
[
'lifetime'
]
:
0
;
Cookie
::
put
(
Payload
::
cookie
,
$this
->
id
,
$minutes
,
$config
[
'path'
],
$config
[
'domain'
],
$config
[
'secure'
]);
Cookie
::
put
(
$
cookie
,
$this
->
id
,
$minutes
,
$config
[
'path'
],
$config
[
'domain'
],
$config
[
'secure'
]);
}
}
/**
/**
...
...
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