added check if config.cfg is present
This commit is contained in:
parent
8211b2f3c9
commit
86317469f7
|
@ -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>
|
||||
|
|
Loading…
Reference in New Issue