diff --git a/config.php.template b/config.php.template index 97c4c69..34ae910 100644 --- a/config.php.template +++ b/config.php.template @@ -3,6 +3,7 @@ session_start(); //You can change these: define("NAME", '##name##'); //Website name +define("TITLE", "##title##"); define("WEB_URL", "##url##"); //Used for links define("MAILER_NAME", "##mailer##"); //Mailer name define("MAILER_ADDRESS", "##mailer_email##"); //Mailer address diff --git a/install.php b/install.php index 54b1518..5e17024 100644 --- a/install.php +++ b/install.php @@ -23,7 +23,7 @@ if (isset($_POST['server'])) $mysqli = new mysqli($_POST['server'],$_POST['dbuser'],$_POST['dbpassword'],$_POST['database']); if ($mysqli->connect_errno) { - $message .= sprintf(_("Connection failed: %s\n"), $mysqli->connect_error); + $message .= sprintf(_("Connection failed: %s\n"), $mysqli->connect_error); } if (isset($_POST['url']) && filter_var($_POST['url'], FILTER_VALIDATE_URL) === false) @@ -44,6 +44,10 @@ if (isset($_POST['server'])) $messages[] = _("Mailer name"); } + if (0 == strlen(trim($_POST['title']))){ + $messages[] = _("Title"); + } + if (0 == strlen(trim($_POST['mailer_email']))){ $messages[] = _("Mailer email"); } @@ -66,7 +70,7 @@ if (isset($_POST['server'])) } if (isset($messages)) { - $message .= _("Please set"); + $message .= _("Please enter"); $message .= implode(", ", $messages); } } @@ -108,6 +112,7 @@ if(isset($_POST['server']) && empty($message)) //Create config $config = file_get_contents("config.php.template"); $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); $config = str_replace("##mailer_email##", $_POST['mailer_email'], $config); @@ -131,57 +136,64 @@ Template::render_header(_("Install")); -
- + + +