}
/**
- * Setup settings_test.php in the build/settings directory from build/.env file
+ * Setup settings-frontend.php in the build/website directory
*
* @return null
*/
public function setupWebsite()
{
- $rOutputFile = fopen(CONST_InstallPath.'/settings/settings-frontend.php', 'w');
-
- // Currently using CONST_BasePath and CONST_InstallPath.
- // Once dotenv is setup, getenv() can be used, or another
- // alternate option is to build settings_test.php using cmake.
+ $rOutputFile = fopen(CONST_InstallPath.'/website/settings-frontend.php', 'w');
fwrite($rOutputFile, "<?php
@define('CONST_BasePath', '".CONST_BasePath."');
if (file_exists(getenv('NOMINATIM_SETTINGS'))) require_once(getenv('NOMINATIM_SETTINGS'));
-@define('CONST_Debug', ". (CONST_Debug? 'true' : 'false').");
@define('CONST_Database_DSN', '".CONST_Database_DSN."'); // or add ;host=...;port=...;user=...;password=...
-@define('CONST_Default_Language', ".(CONST_Default_Language ? 'true' : 'false').");
+@define('CONST_Default_Language', ".(CONST_Default_Language ? ("'".CONST_Default_Language."'") : 'false').");
@define('CONST_Default_Lat', ".CONST_Default_Lat.");
@define('CONST_Default_Lon', ".CONST_Default_Lon.");
@define('CONST_Default_Zoom', ".CONST_Default_Zoom.");
@define('CONST_Use_US_Tiger_Data', ".(CONST_Use_US_Tiger_Data ? 'true' : 'false').");
@define('CONST_Website_BaseURL', '".CONST_Website_BaseURL."');
");
- info(CONST_InstallPath.'/settings/settings-frontend.php has been set up successfully');
+ info(CONST_InstallPath.'/website/settings-frontend.php has been set up successfully');
}
private function removeFlatnodeFile()