From: kkalev Date: Sun, 12 Jan 2003 11:03:13 +0000 (+0000) Subject: Make things a little bit more simple in lib/ldap/change_attrs.php3 X-Git-Url: https://git.entuzijast.net/?a=commitdiff_plain;h=1c4e169db131cddd2f9d63ef6980e4e44469aa79;p=freeradius-dialup-admin.git Make things a little bit more simple in lib/ldap/change_attrs.php3 --- diff --git a/Changelog b/Changelog index 99da66b..11cfc3d 100644 --- a/Changelog +++ b/Changelog @@ -29,6 +29,7 @@ Ver 1.62: * Add debug statements in the pg driver * In debug, output the sql queries in italic. Refer to enabling debugging in the FAQ * Don't include user_info.php3 in the user_test page. +* Make things a little bit more simple in lib/ldap/change_attrs.php3 Ver 1.61: * Add a string encoder for greek * If general_decode_normal_attributes is set then encode attributes in lib/ldap/change_info. In the near future diff --git a/lib/ldap/change_attrs.php3 b/lib/ldap/change_attrs.php3 index 9e14945..60b2f57 100644 --- a/lib/ldap/change_attrs.php3 +++ b/lib/ldap/change_attrs.php3 @@ -44,7 +44,7 @@ require_once('../lib/ldap/functions.php3'); // else{ if (isset($item_vals["$key"][$j])){ - $mod[$attrmap["$key"]][] = $item_vals["$key"][$j]; + $del[$attrmap["$key"]][] = $item_vals["$key"][$j]; $add_r[$attrmap["$key"]][] = $val; } else{ @@ -53,14 +53,14 @@ require_once('../lib/ldap/functions.php3'); } } } - if (isset($mod)){ + if (isset($del)){ if ($config[ldap_debug] == 'true'){ print "DEBUG(LDAP): ldap_mod_del(): DN='$dn'
\n"; print "DEBUG(LDAP): ldap_mod_del(): Data:"; - print_r($mod); + print_r($del); print "
\n"; } - @ldap_mod_del($ds,$dn,$mod); + @ldap_mod_del($ds,$dn,$del); } if (isset($add_r)){ if ($config[ldap_debug] == 'true'){ @@ -71,15 +71,6 @@ require_once('../lib/ldap/functions.php3'); } @ldap_mod_add($ds,$dn,$add_r); } - if (isset($del)){ - if ($config[ldap_debug] == 'true'){ - print "DEBUG(LDAP): ldap_mod_replace(): DN='$dn'
\n"; - print "DEBUG(LDAP): ldap_mod_replace(): Data:"; - print_r($del); - print "
\n"; - } - @ldap_mod_del($ds,$dn,$del); - } } if (@ldap_error($ds) == 'Success') echo "The changes were successfully commited to the directory
\n";