Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
7d20e98a
Commit
7d20e98a
authored
12 years ago
by
Bart Visscher
Browse files
Options
Downloads
Patches
Plain Diff
Move getting the path info to OC_Request
parent
95031cb1
Loading
Loading
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
lib/request.php
+13
-0
13 additions, 0 deletions
lib/request.php
remote.php
+1
-5
1 addition, 5 deletions
remote.php
with
14 additions
and
5 deletions
lib/request.php
+
13
−
0
View file @
7d20e98a
...
...
@@ -52,6 +52,19 @@ class OC_Request {
return
(
$proto
);
}
/**
* @brief get Path info from request
* @returns string Path info or false when not found
*/
public
static
function
getPathInfo
()
{
if
(
array_key_exists
(
'PATH_INFO'
,
$_SERVER
)){
$path_info
=
$_SERVER
[
'PATH_INFO'
];
}
else
{
$path_info
=
substr
(
$_SERVER
[
'REQUEST_URI'
],
strlen
(
$_SERVER
[
'SCRIPT_NAME'
]));
}
return
$path_info
;
}
/**
* @brief Check if this is a no-cache request
* @returns true for no-cache
...
...
This diff is collapsed.
Click to expand it.
remote.php
+
1
−
5
View file @
7d20e98a
...
...
@@ -2,11 +2,7 @@
$RUNTIME_NOSETUPFS
=
true
;
$RUNTIME_NOAPPS
=
TRUE
;
require_once
(
'lib/base.php'
);
if
(
array_key_exists
(
'PATH_INFO'
,
$_SERVER
)){
$path_info
=
$_SERVER
[
'PATH_INFO'
];
}
else
{
$path_info
=
substr
(
$_SERVER
[
'REQUEST_URI'
],
strlen
(
$_SERVER
[
'SCRIPT_NAME'
]));
}
$path_info
=
OC_Request
::
getPathInfo
();
if
(
$path_info
===
false
)
{
OC_Response
::
setStatus
(
OC_Response
::
STATUS_NOT_FOUND
);
exit
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment