added check if config.cfg is present
This commit is contained in:
parent
8211b2f3c9
commit
86317469f7
|
@ -60,9 +60,9 @@ echo $_SESSION['header'];
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
$cfg = new CfgMain();
|
||||||
// check if submit button was pressed
|
// check if submit button was pressed
|
||||||
if ($_POST['submit']) {
|
if ($_POST['submit']) {
|
||||||
$cfg = new CfgMain();
|
|
||||||
// check master password
|
// check master password
|
||||||
if ($cfg->password != $_POST['passwd']) {
|
if ($cfg->password != $_POST['passwd']) {
|
||||||
$error = _("Master password is wrong!");
|
$error = _("Master password is wrong!");
|
||||||
|
@ -142,6 +142,14 @@ if ($_POST['submit']) {
|
||||||
else exit;
|
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>
|
<br>
|
||||||
|
|
Loading…
Reference in New Issue