Fix: Message to show only if no error on connect
This commit is contained in:
parent
1dfeaed082
commit
9382e5b6ef
@ -34,6 +34,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
require_once(DOL_DOCUMENT_ROOT."/contact.class.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
$langs->load("errors");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -297,6 +298,11 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
print "LDAP input file used for test:<br><br>\n";
|
||||||
|
print nl2br($ldap->dump_content($dn,$info));
|
||||||
|
print "\n<br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -306,11 +312,6 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
print "LDAP input file used for test:<br><br>\n";
|
|
||||||
print nl2br($ldap->dump_content($dn,$info));
|
|
||||||
print "\n<br>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
$langs->load("errors");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -219,6 +220,11 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
print "LDAP input file used for test:<br><br>\n";
|
||||||
|
print nl2br($ldap->dump_content($dn,$info));
|
||||||
|
print "\n<br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -228,11 +234,6 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
print "LDAP input file used for test:<br><br>\n";
|
|
||||||
print nl2br($ldap->dump_content($dn,$info));
|
|
||||||
print "\n<br>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
$langs->load("errors");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -411,6 +412,11 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
print "LDAP input file used for test:<br><br>\n";
|
||||||
|
print nl2br($ldap->dump_content($dn,$info));
|
||||||
|
print "\n<br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -420,11 +426,6 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
print "LDAP input file used for test:<br><br>\n";
|
|
||||||
print nl2br($ldap->dump_content($dn,$info));
|
|
||||||
print "\n<br>";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -35,6 +35,7 @@ require_once(DOL_DOCUMENT_ROOT."/lib/ldap.class.php");
|
|||||||
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
require_once(DOL_DOCUMENT_ROOT."/lib/ldap.lib.php");
|
||||||
|
|
||||||
$langs->load("admin");
|
$langs->load("admin");
|
||||||
|
$langs->load("errors");
|
||||||
|
|
||||||
if (!$user->admin)
|
if (!$user->admin)
|
||||||
accessforbidden();
|
accessforbidden();
|
||||||
@ -313,6 +314,11 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print "<br>\n";
|
||||||
|
print "LDAP input file used for test:<br><br>\n";
|
||||||
|
print nl2br($ldap->dump_content($dn,$info));
|
||||||
|
print "\n<br>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -322,11 +328,6 @@ if (function_exists("ldap_connect"))
|
|||||||
print '</font><br>';
|
print '</font><br>';
|
||||||
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
print $langs->trans("ErrorLDAPMakeManualTest",$conf->ldap->dir_temp).'<br>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "<br>\n";
|
|
||||||
print "LDAP input file used for test:<br><br>\n";
|
|
||||||
print nl2br($ldap->dump_content($dn,$info));
|
|
||||||
print "\n<br>";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user