From d1541119ad82e59e2ab3ba6ae453ffb3c627bb2a Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Thu, 13 Nov 2003 18:52:44 +0000 Subject: [PATCH] better error messages if ldap_add() fails --- lam/templates/domain.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lam/templates/domain.php b/lam/templates/domain.php index c9bd630d..4db48729 100644 --- a/lam/templates/domain.php +++ b/lam/templates/domain.php @@ -275,10 +275,10 @@ elseif ($_POST['sub_save']) { if ($_POST['dom_nextUserRID']) $attr['sambaNextUserRid'] = $_POST['dom_nextUserRID']; $attr['sambaAlgorithmicRidBase'] = $_POST['dom_RIDbase']; // write to LDAP - if (ldap_add($_SESSION['ldap']->server(), $DN, $attr)) { + if (@ldap_add($_SESSION['ldap']->server(), $DN, $attr)) { StatusMessage("INFO", "Domain has been created.", $DN); } - else StatusMessage("ERROR", "", "Failed to add domain!"); + else StatusMessage("ERROR", "", "Failed to add domain!" . "\n
" . ldap_error($_SESSION['ldap']->server())); } echo "

 

\n"; echo "

" . _("Back to domain list") . "

\n";