Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
85b6c60d
Commit
85b6c60d
authored
May 13, 2016
by
Carsten Rose
Browse files
Variables.php: fixed access to variables without apache
parent
92d93c0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/report/Variables.php
View file @
85b6c60d
...
...
@@ -108,10 +108,23 @@ class Variables {
public
function
collectGlobalVariables
()
{
$arr
=
array
();
//TODO: Variablen sollten vom STORE_TYPO3 genommen werden
$arr
[
"REMOTE_ADDR"
]
=
$_SERVER
[
"REMOTE_ADDR"
];
$arr
[
"HTTP_HOST"
]
=
$_SERVER
[
"HTTP_HOST"
];
$arr
[
"REQUEST_URI"
]
=
$_SERVER
[
"REQUEST_URI"
];
if
(
isset
(
$_SERVER
[
"REMOTE_ADDR"
]))
{
//TODO: Variablen sollten vom STORE_TYPO3 genommen werden
$arr
[
"REMOTE_ADDR"
]
=
$_SERVER
[
"REMOTE_ADDR"
];
$arr
[
"HTTP_HOST"
]
=
$_SERVER
[
"HTTP_HOST"
];
$arr
[
"REQUEST_URI"
]
=
$_SERVER
[
"REQUEST_URI"
];
$protocol
=
'http'
;
if
(
isset
(
$_SERVER
[
'HTTPS'
]))
{
if
(
$_SERVER
[
"HTTPS"
]
!=
"off"
)
$protocol
=
'https'
;
}
$arr
[
"url"
]
=
$protocol
.
"://"
.
$_SERVER
[
"HTTP_HOST"
];
if
(
$_SERVER
[
"SERVER_PORT"
]
!=
80
)
$arr
[
"url"
]
.
=
":"
.
$_SERVER
[
"SERVER_PORT"
];
$arr
[
"url"
]
.
=
$arr
[
"REQUEST_URI"
];
}
if
(
isset
(
$GLOBALS
[
"TSFE"
]
->
fe_user
))
{
$arr
[
"fe_user_uid"
]
=
$GLOBALS
[
"TSFE"
]
->
fe_user
->
user
[
"uid"
]
?:
'-'
;
$arr
[
"fe_user"
]
=
$GLOBALS
[
"TSFE"
]
->
fe_user
->
user
[
"username"
]
?:
'-'
;
...
...
@@ -125,15 +138,6 @@ class Variables {
$arr
[
"page_type"
]
=
$GLOBALS
[
"TSFE"
]
->
type
;
$arr
[
"page_language_uid"
]
=
$GLOBALS
[
"TSFE"
]
->
sys_language_uid
;
$arr
[
"ttcontent_uid"
]
=
$this
->
tt_content_uid
;
$protocol
=
'http'
;
if
(
isset
(
$_SERVER
[
'HTTPS'
]))
{
if
(
$_SERVER
[
"HTTPS"
]
!=
"off"
)
$protocol
=
'https'
;
}
$arr
[
"url"
]
=
$protocol
.
"://"
.
$_SERVER
[
"HTTP_HOST"
];
if
(
$_SERVER
[
"SERVER_PORT"
]
!=
80
)
$arr
[
"url"
]
.
=
":"
.
$_SERVER
[
"SERVER_PORT"
];
$arr
[
"url"
]
.
=
$arr
[
"REQUEST_URI"
];
// Add all variables from ext_localconf
// database aliases can be used in form sql queries (e.g. select * from "{{global.t3_name}}".fe_users...)
...
...
Write
Preview
Supports
Markdown
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