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
45538620
Commit
45538620
authored
Oct 16, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixing bugs and refactoring.
parent
a7e98e8e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
url.php
laravel/url.php
+8
-6
view.php
laravel/view.php
+7
-5
No files found.
laravel/url.php
View file @
45538620
...
@@ -20,13 +20,13 @@ class URL {
...
@@ -20,13 +20,13 @@ class URL {
{
{
if
(
filter_var
(
$url
,
FILTER_VALIDATE_URL
)
!==
false
)
return
$url
;
if
(
filter_var
(
$url
,
FILTER_VALIDATE_URL
)
!==
false
)
return
$url
;
// First, we
need to build the base URL for the application, as well as handle
// First, we
build the base URL for the application, as well as handle the generation
//
the generation of links using SSL. It is possible for the developer to disable
//
of links using SSL. It is possible for the developer to disable the generation
//
the generation of SSL links throughout the application, making it mor
e
//
of SSL links throughout the application, making it more convenient to creat
e
//
convenient to create
applications without SSL on the development box.
// applications without SSL on the development box.
$base
=
Config
::
get
(
'application.url'
)
.
'/'
.
Config
::
get
(
'application.index'
)
;
$base
=
Config
::
$items
[
'application'
][
'url'
]
.
'/'
.
Config
::
$items
[
'application'
][
'index'
]
;
if
(
$https
and
Config
::
get
(
'application.ssl'
)
)
if
(
$https
and
Config
::
$items
[
'application'
][
'ssl'
]
)
{
{
$base
=
preg_replace
(
'~http://~'
,
'https://'
,
$base
,
1
);
$base
=
preg_replace
(
'~http://~'
,
'https://'
,
$base
,
1
);
}
}
...
@@ -88,6 +88,8 @@ class URL {
...
@@ -88,6 +88,8 @@ class URL {
{
{
$uris
=
explode
(
', '
,
key
(
$route
));
$uris
=
explode
(
', '
,
key
(
$route
));
// Grab the first URI assigned to the route, removing the request URI
// and leading slash from the destination defined on the route.
$uri
=
substr
(
$uris
[
0
],
strpos
(
$uris
[
0
],
'/'
));
$uri
=
substr
(
$uris
[
0
],
strpos
(
$uris
[
0
],
'/'
));
// Spin through each route parameter and replace the route wildcard
// Spin through each route parameter and replace the route wildcard
...
...
laravel/view.php
View file @
45538620
...
@@ -133,10 +133,9 @@ class View {
...
@@ -133,10 +133,9 @@ class View {
{
{
if
(
is_null
(
static
::
$composers
))
static
::
$composers
=
require
APP_PATH
.
'composers'
.
EXT
;
if
(
is_null
(
static
::
$composers
))
static
::
$composers
=
require
APP_PATH
.
'composers'
.
EXT
;
// The view's name may specified in several different ways in the
// The view's name may specified in several different ways in the composers file.
// composers file. The composer may simple have a string value,
// The composer may simple have a string value, which is the name. Or, it may
// which is the name. Or, the composer could have an array
// an array value in which a "name" key exists.
// value in which a "name" key exists.
foreach
(
static
::
$composers
as
$key
=>
$value
)
foreach
(
static
::
$composers
as
$key
=>
$value
)
{
{
if
(
$name
===
$value
or
(
is_array
(
$value
)
and
$name
===
Arr
::
get
(
$value
,
'name'
)))
return
$key
;
if
(
$name
===
$value
or
(
is_array
(
$value
)
and
$name
===
Arr
::
get
(
$value
,
'name'
)))
return
$key
;
...
@@ -177,7 +176,10 @@ class View {
...
@@ -177,7 +176,10 @@ class View {
// main view is evaluated and dumps the links to the assets.
// main view is evaluated and dumps the links to the assets.
foreach
(
$this
->
data
as
&
$data
)
foreach
(
$this
->
data
as
&
$data
)
{
{
if
(
$data
instanceof
View
or
$data
instanceof
Response
)
$data
=
$data
->
render
();
if
(
$data
instanceof
View
or
$data
instanceof
Response
)
{
$data
=
$data
->
render
();
}
}
}
ob_start
()
and
extract
(
$this
->
data
,
EXTR_SKIP
);
ob_start
()
and
extract
(
$this
->
data
,
EXTR_SKIP
);
...
...
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