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
49d96669
Commit
49d96669
authored
Feb 16, 2012
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final code cleanup
parent
f41717dc
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
18 deletions
+29
-18
bundle.php
laravel/bundle.php
+3
-3
config.php
laravel/config.php
+1
-1
cookie.php
laravel/cookie.php
+25
-14
No files found.
laravel/bundle.php
View file @
49d96669
...
@@ -81,9 +81,9 @@ class Bundle {
...
@@ -81,9 +81,9 @@ class Bundle {
throw
new
\Exception
(
"Bundle [
$bundle
] has not been installed."
);
throw
new
\Exception
(
"Bundle [
$bundle
] has not been installed."
);
}
}
// Each bundle may have a
"start"
script which is responsible for preparing
// Each bundle may have a
start
script which is responsible for preparing
// the bundle for use by the application. The start script may register
any
// the bundle for use by the application. The start script may register
// classes the bundle uses with the auto-loader, etc.
//
any
classes the bundle uses with the auto-loader, etc.
if
(
file_exists
(
$path
=
static
::
path
(
$bundle
)
.
'start'
.
EXT
))
if
(
file_exists
(
$path
=
static
::
path
(
$bundle
)
.
'start'
.
EXT
))
{
{
require
$path
;
require
$path
;
...
...
laravel/config.php
View file @
49d96669
...
@@ -141,7 +141,7 @@ class Config {
...
@@ -141,7 +141,7 @@ class Config {
// If there are not at least two segments in the array, it means that the
// If there are not at least two segments in the array, it means that the
// developer is requesting the entire configuration array to be returned.
// developer is requesting the entire configuration array to be returned.
// If that is the case, we'll make the item field
of the array
"null".
// If that is the case, we'll make the item field "null".
if
(
count
(
$segments
)
>=
2
)
if
(
count
(
$segments
)
>=
2
)
{
{
$parsed
=
array
(
$bundle
,
$segments
[
0
],
implode
(
'.'
,
array_slice
(
$segments
,
1
)));
$parsed
=
array
(
$bundle
,
$segments
[
0
],
implode
(
'.'
,
array_slice
(
$segments
,
1
)));
...
...
laravel/cookie.php
View file @
49d96669
...
@@ -31,10 +31,22 @@ class Cookie {
...
@@ -31,10 +31,22 @@ class Cookie {
{
{
if
(
headers_sent
())
return
false
;
if
(
headers_sent
())
return
false
;
// All cookies are stored in the "jar" when set and not sent directly to
// All cookies are stored in the "jar" when set and not sent directly to
the
//
the browser. This simply makes testing all of the cookie stuff ver
y
//
browser. This simply makes testing all of the cookie stuff very eas
y
//
easy
since the jar can be inspected by the tests.
// since the jar can be inspected by the tests.
foreach
(
static
::
$jar
as
$cookie
)
foreach
(
static
::
$jar
as
$cookie
)
{
static
::
set
(
$cookie
);
}
}
/**
* Send a cookie from the cookie jar back to the browser.
*
* @param array $cookie
* @return void
*/
protected
static
function
set
(
$cookie
)
{
{
extract
(
$cookie
);
extract
(
$cookie
);
...
@@ -42,7 +54,7 @@ class Cookie {
...
@@ -42,7 +54,7 @@ class Cookie {
// A cookie payload can't exceed 4096 bytes, so if the payload is greater
// A cookie payload can't exceed 4096 bytes, so if the payload is greater
// than that, we'll raise an error to warn the developer since it could
// than that, we'll raise an error to warn the developer since it could
// cause serious
session problems.
// cause serious cookie-based
session problems.
$value
=
static
::
sign
(
$name
,
$value
);
$value
=
static
::
sign
(
$name
,
$value
);
if
(
strlen
(
$value
)
>
4000
)
if
(
strlen
(
$value
)
>
4000
)
...
@@ -52,7 +64,6 @@ class Cookie {
...
@@ -52,7 +64,6 @@ class Cookie {
setcookie
(
$name
,
$value
,
$time
,
$path
,
$domain
,
$secure
);
setcookie
(
$name
,
$value
,
$time
,
$path
,
$domain
,
$secure
);
}
}
}
/**
/**
* Get the value of a cookie.
* Get the value of a cookie.
...
...
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