From 23dc109764942d02d4e3196bbf143bb37999f48e Mon Sep 17 00:00:00 2001 From: Thomas Nilsen Date: Wed, 19 Aug 2020 23:24:32 +0200 Subject: [PATCH] Removed Telegram and email notification setup from install routine. In prepearing to move the config.php options to db options, the following config options have been removed from config.php - SUBSCRIBE_TELEGRAM - SUBSCRIBE_EMAIL - TG_BOT_API_TOKEN - TG_BOT_USERNAME - GOOGLE_RECAPTCHA - GOOGLE_RECAPTCHA_SITEKEY - GOOGLE_RECAPTCHA_SECRET - PHP_MAILER - PHP_MAILER_PATH - PHP_MAILER_SMTP - PHP_MAILER_HOST - PHP_MAILER_PORT - PHP_MAILER_SECURE - PHP_MAILER_USER - PHP_MAILER_PASS - CRON_SERVER_IP --- config.php.template | 16 ---------------- install.php | 15 +-------------- 2 files changed, 1 insertion(+), 30 deletions(-) diff --git a/config.php.template b/config.php.template index 7722444..cc293d8 100644 --- a/config.php.template +++ b/config.php.template @@ -31,26 +31,10 @@ define("POLICY_MAIL", "##policy_mail##"); //contact email in policy define("POLICY_PHONE", "##policy_phone##"); define("WHO_WE_ARE","##who_we_are##"); define("POLICY_URL","##policy_url##"); -define('SUBSCRIBE_EMAIL', true); -define('SUBSCRIBE_TELEGRAM', false); -define("TG_BOT_API_TOKEN", "##tg_bot_token##"); //Telegram Bot Token -define("TG_BOT_USERNAME", "##tg_bot_username##"); //Telegram Bot username define("INSTALL_OVERRIDE", false); define("DEFAULT_LANGUAGE", "en_GB"); -define("GOOGLE_RECAPTCHA", false); -define("GOOGLE_RECAPTCHA_SITEKEY", "##google_site_key##"); -define("GOOGLE_RECAPTCHA_SECRET", "##google_secret##"); -define("PHP_MAILER", false); // Enable if we are to use extenral PHPMailer() library -define("PHP_MAILER_PATH", "##phpmailer_path##"); // Path to src folder of PHPMailer() library - without ending / -define("PHP_MAILER_SMTP", false); // Set to true if we are to use SMTP -define("PHP_MAILER_HOST", "##phpmailer_host##"); // SMTP host -define("PHP_MAILER_PORT", "##phpmailer_port##"); // SMTP Port -define("PHP_MAILER_SECURE", ""); // Set to TLS or SSL or leave blank for plaintext -define("PHP_MAILER_USER", "##phpmailer_user##"); // SMTP Authentication user -define("PHP_MAILER_PASS", "##phpmailer_pass##"); // SMTP authenticatin password define("CUSTOM_LOGO_URL",""); // This will use the default logo if left empty define("COPYRIGHT_TEXT",""); // Leave this empty if you don't want your copyright displayed -define("CRON_SERVER_IP",""); // IP Address that will be used to call cron task. Leave empty if not used! // Without COPYRIGHT_TEXT Set // 2020 Server Status Project Contributors // With COPYRIGHT_TEXT Set diff --git a/install.php b/install.php index 60e7552..84a3ab8 100644 --- a/install.php +++ b/install.php @@ -6,8 +6,6 @@ define("MINIMUM_PHP_VERSION", "5.4.0"); define("POLICY_URL", "policy.php"); //Default policy URL define("CUSTOM_LOGO_URL",""); define("COPYRIGHT_TEXT",""); -define('SUBSCRIBE_EMAIL', false); -define('SUBSCRIBE_TELEGRAM', false); require_once("classes/locale-negotiator.php"); require_once("classes/db-class.php"); @@ -141,9 +139,7 @@ if(isset($_POST['server']) && empty($message)) $config = str_replace("##who_we_are##", htmlspecialchars($_POST['who_we_are'], ENT_QUOTES), $config); $policy_url_conf = ( ! empty($_POST['policy_url']) ) ? htmlspecialchars($_POST['policy_url'], ENT_QUOTES) : $_POST['url']."/policy.php"; $config = str_replace("##policy_url##", $policy_url_conf, $config); - $config = str_replace("##tg_bot_token##", htmlspecialchars($_POST['tgtoken'], ENT_QUOTES), $config); - $config = str_replace("##tg_bot_username##", htmlspecialchars($_POST['tgbot'], ENT_QUOTES), $config); - + file_put_contents("config.php", $config); include_once "create-server-config.php"; @@ -247,15 +243,6 @@ if (!empty($message))
" class="form-control" required>
-
-

- - -
-
" class="form-control">
-
" class="form-control">
-
-