smtp and viewr password moved to generated config.php
This commit is contained in:
@ -89,16 +89,18 @@ class Renderer
|
||||
// Copy handler
|
||||
copy($this->templatesPath . '/emailer.php', $projectExportDir . '/ajax.php');
|
||||
|
||||
// Create config for handler
|
||||
// Create config for handler (PHP file is not web-accessible)
|
||||
$siteConfig = [
|
||||
'site_name' => $projectData['wizard_data']['identity']['business_name'],
|
||||
'form_mode' => $formConfig['mode'] ?? 'local',
|
||||
'smtp' => $formConfig['smtp'] ?? null,
|
||||
'local_password_hash' => $formConfig['local_viewer']['password_hash'] ?? null
|
||||
];
|
||||
file_put_contents($projectExportDir . '/config.json', json_encode($siteConfig, JSON_PRETTY_PRINT));
|
||||
|
||||
$configContent = "<?php\nreturn " . var_export($siteConfig, true) . ";\n";
|
||||
file_put_contents($projectExportDir . '/config.php', $configContent);
|
||||
|
||||
if ($siteConfig['form_mode'] === 'local') {
|
||||
if (($siteConfig['form_mode'] ?? 'local') === 'local') {
|
||||
// Copy viewer
|
||||
copy($this->templatesPath . '/form-viewer.php', $projectExportDir . '/form-viewer.php');
|
||||
// Create messages dir
|
||||
|
||||
Reference in New Issue
Block a user