Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dokuwiki
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
BRIC
dokuwiki
Commits
26714386
Commit
26714386
authored
7 years ago
by
Andreas Gohr
Browse files
Options
Downloads
Patches
Plain Diff
moved function and fixed whitespace errors
parent
6aad717e
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
inc/init.php
+18
-17
18 additions, 17 deletions
inc/init.php
with
18 additions
and
17 deletions
inc/init.php
+
18
−
17
View file @
26714386
...
@@ -3,13 +3,6 @@
...
@@ -3,13 +3,6 @@
* Initialize some defaults needed for DokuWiki
* Initialize some defaults needed for DokuWiki
*/
*/
/**
* checks it is windows OS
* @return bool
*/
function
isWindows
()
{
return
(
strtoupper
(
substr
(
PHP_OS
,
0
,
3
))
===
'WIN'
)
?
true
:
false
;
}
/**
/**
* timing Dokuwiki execution
* timing Dokuwiki execution
...
@@ -487,23 +480,31 @@ function getBaseURL($abs=null){
...
@@ -487,23 +480,31 @@ function getBaseURL($abs=null){
*
*
* @returns bool true when SSL is active
* @returns bool true when SSL is active
*/
*/
function
is_ssl
(){
function
is_ssl
()
{
// check if we are behind a reverse proxy
// check if we are behind a reverse proxy
if
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]))
{
if
(
isset
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]))
{
if
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
==
'https'
)
{
if
(
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
==
'https'
)
{
return
true
;
return
true
;
}
else
{
}
else
{
return
false
;
return
false
;
}
}
}
}
if
(
!
isset
(
$_SERVER
[
'HTTPS'
])
||
if
(
!
isset
(
$_SERVER
[
'HTTPS'
])
||
preg_match
(
'/^(|off|false|disabled)$/i'
,
$_SERVER
[
'HTTPS'
])){
preg_match
(
'/^(|off|false|disabled)$/i'
,
$_SERVER
[
'HTTPS'
]))
{
return
false
;
return
false
;
}
else
{
}
else
{
return
true
;
return
true
;
}
}
}
}
/**
* checks it is windows OS
* @return bool
*/
function
isWindows
()
{
return
(
strtoupper
(
substr
(
PHP_OS
,
0
,
3
))
===
'WIN'
)
?
true
:
false
;
}
/**
/**
* print a nice message even if no styles are loaded yet.
* print a nice message even if no styles are loaded yet.
*
*
...
...
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