mirror of
https://github.com/klokantech/tileserver-php.git
synced 2025-08-02 12:47:31 +02:00
Get global vars via getenv
This commit is contained in:
@@ -65,12 +65,14 @@ class Server {
|
|||||||
$this->config = $GLOBALS['config'];
|
$this->config = $GLOBALS['config'];
|
||||||
|
|
||||||
//Get config from enviroment
|
//Get config from enviroment
|
||||||
if(isset($_ENV['serverTitle'])){
|
$envServerTitle = getenv('serverTitle');
|
||||||
$this->config['serverTitle'] = $_ENV['serverTitle'];
|
if($envServerTitle !== FALSE){
|
||||||
|
$this->config['serverTitle'] = $envServerTitle;
|
||||||
}
|
}
|
||||||
if(isset($_ENV['baseUrls'])){
|
$envBaseUrls = getenv('baseUrls');
|
||||||
$this->config['baseUrls'] = is_array($_ENV['baseUrls']) ?
|
if($envBaseUrls !== FALSE){
|
||||||
$_ENV['baseUrls'] : explode(',', $_ENV['baseUrls']);
|
$this->config['baseUrls'] = is_array($envBaseUrls) ?
|
||||||
|
$envBaseUrls : explode(',', $envBaseUrls);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user