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
f9ec36d7
Commit
f9ec36d7
authored
Nov 12, 2011
by
Taylor Otwell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slight clean-up to uri method.
parent
6cbac0e0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
request.php
laravel/request.php
+5
-5
No files found.
laravel/request.php
View file @
f9ec36d7
...
...
@@ -40,7 +40,7 @@ class Request {
// Remove the root application URL from the request URI. If the application
// is nested within a sub-directory of the web document root, this will get
// rid of the sub-directories from the request URI.
// rid of
all of the
the sub-directories from the request URI.
$base
=
parse_url
(
Config
::
$items
[
'application'
][
'url'
],
PHP_URL_PATH
);
if
(
strpos
(
$uri
,
$base
)
===
0
)
...
...
@@ -48,8 +48,6 @@ class Request {
$uri
=
substr
(
$uri
,
strlen
(
$base
));
}
// Remove the application index file. It is not used for anything as far
// as the framework and routing is concerned, so it's worthless.
$index
=
'/'
.
Config
::
$items
[
'application'
][
'index'
];
if
(
$index
!==
'/'
and
strpos
(
$uri
,
$index
)
===
0
)
...
...
@@ -57,10 +55,12 @@ class Request {
$uri
=
substr
(
$uri
,
strlen
(
$index
));
}
$uri
=
trim
(
$uri
,
'/'
);
// Format the final request URI. If there is nothing left, we will just
// return a single forward slash. Otherwise, we'll remove all of the
// leading and trailing spaces from the URI.
return
static
::
$uri
=
(
(
$uri
=
trim
(
$uri
,
'/'
))
!==
''
)
?
$uri
:
'/'
;
// leading and trailing spaces from the URI
before returning it
.
return
static
::
$uri
=
(
$uri
!==
''
)
?
$uri
:
'/'
;
}
/**
...
...
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