From cad6c58fa706b5c47a7e41bc8bc38e1e2984fac9 Mon Sep 17 00:00:00 2001 From: katagia Date: Thu, 30 Oct 2003 08:15:32 +0000 Subject: [PATCH] Fixed little bug. Displayed Final-Page although there are some errors. Fixed. --- lam/templates/account/groupedit.php | 3 ++- lam/templates/account/useredit.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lam/templates/account/groupedit.php b/lam/templates/account/groupedit.php index 32370338..f9c7d5ec 100644 --- a/lam/templates/account/groupedit.php +++ b/lam/templates/account/groupedit.php @@ -328,7 +328,8 @@ do { // X-Or, only one if() can be true } if ($_POST['next_final']) { // Check if objectclasses are OK - $stay = false; + if (is_array($errors)) $stay=true; + else $stay = false; if ($config_intern->is_samba3() && !isset($account_new->smb_domain)) { // Samba page not viewed; can not create group because if missing options $errors[] = array("ERROR", _("Samba Options not set!"), _("Please check settings on samba page.")); diff --git a/lam/templates/account/useredit.php b/lam/templates/account/useredit.php index b1d0f33b..481c4b2e 100644 --- a/lam/templates/account/useredit.php +++ b/lam/templates/account/useredit.php @@ -544,7 +544,8 @@ do { // X-Or, only one if() can be true } if ($_POST['next_final']) { // Go from final to next page if no error did ocour - $stay = false; + if (is_array($errors)) $stay=true; + else $stay = false; if (($account_old) && ($account_new->general_uidNumber != $account_old->general_uidNumber)) $errors[] = array('INFO', _('UID-number has changed. You have to run the following command as root in order to change existing file-permissions:'), 'find / -gid ' . $account_old->general_uidNumber . ' -exec chown ' . $account_new->general_uidNumber . ' {} \;');