added check if config.cfg is present

This commit is contained in:
Roland Gruber 2004-10-07 10:16:53 +00:00
parent 8211b2f3c9
commit 86317469f7
1 changed files with 9 additions and 1 deletions

View File

@ -60,9 +60,9 @@ echo $_SESSION['header'];
<?php
$cfg = new CfgMain();
// check if submit button was pressed
if ($_POST['submit']) {
$cfg = new CfgMain();
// check master password
if ($cfg->password != $_POST['passwd']) {
$error = _("Master password is wrong!");
@ -142,6 +142,14 @@ if ($_POST['submit']) {
else exit;
}
// check if config.cfg is valid
if (!isset($cfg->default) && !isset($cfg->password)) {
StatusMessage("ERROR", _("Please set up your master configuration file (config/config.cfg) first!"), "");
echo "</body>\n</html>\n";
die();
}
?>
<br>