Removed small bug, Modify didn't work

Remvoed Session-Vars if not longer needed
This commit is contained in:
katagia 2003-06-02 17:48:02 +00:00
parent 17efd562fb
commit 146304494f
2 changed files with 8 additions and 1 deletions

View File

@ -116,6 +116,7 @@ function initvars($type=false,$DN=false) { // This function registers all needes
}
}
else {
if (session_is_registered("account_old")) session_unregister("account_old");
if ( (($type=='user')||($type=='group')) && ($_SESSION['config']->scriptServer)) $_SESSION['account'] = getquotas($type);
switch ($type) {
case 'user':
@ -500,7 +501,7 @@ function checkid($values, $type, $values_old=false) { // if value is empty will
if ($entry) { // Entry with same ID found
$dn = (ldap_get_dn($_SESSION['ldap']->server(), $entry));
if (!$values_old) return _('ID is used from ' . $dn . ' !');
else if ($dn!=$values_old->general_uidNumber) return _('ID is used from ' . $dn . ' !');
else if ($dn!=$values_old->general_dn) return _('ID is used from ' . $dn . ' !');
}
if ( $values->general_uidNumber < $minID || $values->general_uidNumber > $maxID) return _('Please enter a value between '. $minID . ' and ' . $maxID . '!');
return intval($values->general_uidNumber);

View File

@ -850,14 +850,20 @@ switch ($select_local) {
}
break;
case 'backmain':
if (session_is_registered("shelllist")) session_unregister("shelllist");
if (session_is_registered("account")) session_unregister("account");
if (session_is_registered("account_old")) session_unregister("account_old");
switch ( $_SESSION['type2'] ) {
case 'user' :
if (session_is_registered("type2")) session_unregister("type2");
echo '<meta http-equiv="refresh" content="0; URL=lists/listusers.php">';
break;
case 'group' :
if (session_is_registered("type2")) session_unregister("type2");
echo '<meta http-equiv="refresh" content="0; URL=lists/listgroups.php">';
break;
case 'host' :
if (session_is_registered("type2")) session_unregister("type2");
echo '<meta http-equiv="refresh" content="0; URL=lists/listhosts.php">';
break;
}