only redirect to modules page if there is a new account type
This commit is contained in:
parent
1611b20654
commit
6b86d9836a
|
@ -131,6 +131,7 @@ if (isset($_GET["typesback"])) {
|
|||
|
||||
// type information
|
||||
if (!isset($_SESSION['conf_accountTypes'])) $_SESSION['conf_accountTypes'] = $conf->get_ActiveTypes();
|
||||
if (!isset($_SESSION['conf_accountTypesOld'])) $_SESSION['conf_accountTypesOld'] = $conf->get_ActiveTypes();
|
||||
if (!isset($_SESSION['conf_typeSettings'])) $_SESSION['conf_typeSettings'] = $conf->get_typeSettings();
|
||||
|
||||
// index for tab order
|
||||
|
|
|
@ -89,14 +89,29 @@ if ($_POST['submit']) {
|
|||
}
|
||||
}
|
||||
}
|
||||
//selection ok, back to other settings
|
||||
if ($allOK) {
|
||||
//selection ok, back to other settings
|
||||
metarefresh('confmain.php?typesback=true&typeschanged=true');
|
||||
// check if there is a new type
|
||||
$addedType = false;
|
||||
for ($i = 0; $i < sizeof($_SESSION['conf_accountTypes']); $i++) {
|
||||
if (!in_array($_SESSION['conf_accountTypes'][$i], $_SESSION['conf_accountTypesOld'])) {
|
||||
$addedType = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$_SESSION['conf_accountTypesOld'] = $_SESSION['conf_accountTypes'];
|
||||
if ($addedType) {
|
||||
metarefresh('confmain.php?typesback=true&typeschanged=true');
|
||||
}
|
||||
else {
|
||||
metarefresh('confmain.php?typesback=true');
|
||||
}
|
||||
exit;
|
||||
}
|
||||
}
|
||||
// no changes
|
||||
elseif ($_POST['abort']) {
|
||||
// no changes
|
||||
$_SESSION['conf_accountTypes'] = $_SESSION['conf_accountTypesOld'];
|
||||
metarefresh('confmain.php?typesback=true');
|
||||
exit;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue