Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
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
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
Marcus Eibrink-Lunzenauer
Stud.IP
Commits
49451b26
Commit
49451b26
authored
10 months ago
by
Jan-Hendrik Willms
Browse files
Options
Downloads
Patches
Plain Diff
fixes #4123
Closes #4123 Merge request
studip/studip!2968
parent
51876b9c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
docker/studip/config_local.php
+21
-43
21 additions, 43 deletions
docker/studip/config_local.php
tests/configuration.php
+15
-7
15 additions, 7 deletions
tests/configuration.php
with
36 additions
and
50 deletions
docker/studip/config_local.php
+
21
−
43
View file @
49451b26
<?php
/*basic settings for Stud.IP
----------------------------------------------------------------
you find here the basic system settings. You shouldn't have to touch much of them...
please note the CONFIG.INC.PHP for the indivual settings of your installation!*/
namespace
Studip
{
//const ENV = 'development';
define
(
'ENV'
,
getenv
(
'ENV'
)
??
'development'
);
}
namespace
{
/*settings for database access
----------------------------------------------------------------
please fill in your database connection settings.
*/
define
(
'Studip\\ENV'
,
$_ENV
[
'ENV'
]
??
'development'
);
// default Stud.IP database (DB_Seminar)
$DB_STUDIP_HOST
=
getenv
(
'MYSQL_HOST'
);
$DB_STUDIP_USER
=
getenv
(
'MYSQL_USER'
);
$DB_STUDIP_PASSWORD
=
getenv
(
'MYSQL_PASSWORD'
);
$DB_STUDIP_DATABASE
=
getenv
(
'MYSQL_DATABASE'
);
$MAIL_TRANSPORT
=
getenv
(
'MAIL_TRANSPORT'
);
error_reporting
(
E_ALL
&
~
E_NOTICE
&
~
E_DEPRECATED
);
/*URL
----------------------------------------------------------------
customize if automatic detection fails, e.g. when installation is hidden
behind a proxy
*/
//$CANONICAL_RELATIVE_PATH_STUDIP = '/';
//$ABSOLUTE_URI_STUDIP = 'https://www.studip.de/';
//$ASSETS_URL = 'https://www.studip.de/assets/';
// Set proxy url
if
(
$PROXY_URL
=
getenv
(
'PROXY_URL'
))
{
$ABSOLUTE_URI_STUDIP
=
$PROXY_URL
;
$ASSETS_URL
=
$PROXY_URL
.
'/assets/'
;
unset
(
$PROXY_URL
);
}
/*URL
----------------------------------------------------------------
customize if automatic detection fails, e.g. when installation is hidden
behind a proxy
*/
//$CANONICAL_RELATIVE_PATH_STUDIP = '/';
//$ABSOLUTE_URI_STUDIP = 'https://www.studip.de/';
//$ASSETS_URL = 'https://www.studip.de/assets/';
// Use autoproxy
if
(
getenv
(
'AUTO_PROXY'
))
{
$ABSOLUTE_URI_STUDIP
=
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
.
'://'
.
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
]
.
'/'
;
$ASSETS_URL
=
$ABSOLUTE_URI_STUDIP
.
'/assets/'
;
}
$MAIL_TRANSPORT
=
getenv
(
'STUDIP_MAIL_TRANSPORT'
);
// Set proxy url
if
(
isset
(
$_ENV
[
'PROXY_URL'
]))
{
$ABSOLUTE_URI_STUDIP
=
$_ENV
[
'PROXY_URL'
];
$ASSETS_URL
=
$_ENV
[
'PROXY_URL'
]
.
'/assets/'
;
}
$CONTENT_LANGUAGES
[
'en_GB'
]
=
[
'picture'
=>
'lang_en.gif'
,
'name'
=>
'English'
];
// Use autoproxy
if
(
isset
(
$_ENV
[
'AUTO_PROXY'
]))
{
$ABSOLUTE_URI_STUDIP
=
$_SERVER
[
'HTTP_X_FORWARDED_PROTO'
]
.
'://'
.
$_SERVER
[
'HTTP_X_FORWARDED_HOST'
]
.
'/'
;
$ASSETS_URL
=
$ABSOLUTE_URI_STUDIP
.
'/assets/'
;
}
$CONTENT_LANGUAGES
[
'en_GB'
]
=
[
'picture'
=>
'lang_en.gif'
,
'name'
=>
'English'
];
This diff is collapsed.
Click to expand it.
tests/configuration.php
+
15
−
7
View file @
49451b26
<?php
return
(
function
(
$filename
)
{
i
f
(
file
_exists
(
$filename
)
)
{
require_once
$filename
;
return
compact
(
'DB_STUDIP_HOST'
,
'DB_STUDIP_USER'
,
'DB_STUDIP_PASSWORD'
,
'DB_STUDIP_DATABASE'
);
return
(
function
(
string
...
$filename
s
)
{
f
oreach
(
$
file
names
as
$filename
)
{
if
(
file_exists
(
$filename
))
{
require_once
$filename
;
}
}
return
[];
})(
dirname
(
__DIR__
)
.
'/config/config_local.inc.php'
);
return
array_filter
([
'DB_STUDIP_HOST'
=>
$DB_STUDIP_HOST
??
null
,
'DB_STUDIP_USER'
=>
$DB_STUDIP_USER
??
null
,
'DB_STUDIP_PASSWORD'
=>
$DB_STUDIP_PASSWORD
??
null
,
'DB_STUDIP_DATABASE'
=>
$DB_STUDIP_DATABASE
??
null
,
]);
})(
dirname
(
__DIR__
)
.
'/config/config_defaults.inc.php'
,
dirname
(
__DIR__
)
.
'/config/config_local.inc.php'
);
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