diff --git a/install.php b/install.php index b497da9..3e148bb 100644 --- a/install.php +++ b/install.php @@ -111,12 +111,14 @@ if(isset($_POST['server']) && empty($message)) if (empty($message)) { - //Create config + $fullname = $_POST['surname'] . " " . $_POST['name']; + //Create config & privacy policy $config = file_get_contents("config.php.template"); + $policy = file_get_contents("policy.php"); $config = str_replace("##name##", $_POST['servername'], $config); $config = str_replace("##title##", $_POST['title'], $config); $config = str_replace("##url##", $_POST['url'], $config); - $config = str_replace("##mailer##", $_POST['mailer'], $config); + $policy = str_replace("##mailer##", $_POST['mailer'], $policy); $config = str_replace("##mailer_email##", $_POST['mailer_email'], $config); $config = str_replace("##server##", $_POST['server'], $config); $config = str_replace("##database##", $_POST['database'], $config); @@ -132,6 +134,7 @@ if(isset($_POST['server']) && empty($message)) $config = str_replace("##policy_url##", $policy_url_conf, $config); $config = str_replace("##tg_bot_token##", $_POST['tgtoken'], $config); $config = str_replace("##tg_bot_username##", $_POST['tgbot'], $config); + $policy = str_replace("##name##", $fullname, $policy); file_put_contents("config.php", $config); @@ -248,17 +251,14 @@ if (!empty($message))
-