[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Dolibarr-cvs] dolibarr/htdocs adminldap.php lib/ldap.lib.php
From: |
Regis Houssin |
Subject: |
[Dolibarr-cvs] dolibarr/htdocs adminldap.php lib/ldap.lib.php |
Date: |
Mon, 12 Jun 2006 13:14:03 +0000 |
CVSROOT: /cvsroot/dolibarr
Module name: dolibarr
Changes by: Regis Houssin <hregis> 06/06/12 13:14:03
Modified files:
htdocs/admin : ldap.php
htdocs/lib : ldap.lib.php
Log message:
début amélioration LDAP
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/admin/ldap.php?cvsroot=dolibarr&r1=1.44&r2=1.45
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/lib/ldap.lib.php?cvsroot=dolibarr&r1=1.29&r2=1.30
Patches:
Index: admin/ldap.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/admin/ldap.php,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -b -r1.44 -r1.45
--- admin/ldap.php 12 Jun 2006 12:55:04 -0000 1.44
+++ admin/ldap.php 12 Jun 2006 13:14:02 -0000 1.45
@@ -19,7 +19,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
- * $Id: ldap.php,v 1.44 2006/06/12 12:55:04 hregis Exp $
+ * $Id: ldap.php,v 1.45 2006/06/12 13:14:02 hregis Exp $
* $Source: /cvsroot/dolibarr/dolibarr/htdocs/admin/ldap.php,v $
*/
@@ -27,7 +27,7 @@
\file htdocs/admin/ldap.php
\ingroup ldap
\brief Page d'administration/configuration du module Ldap
- \version $Revision: 1.44 $
+ \version $Revision: 1.45 $
\remarks Exemple configuration :
LDAP_SERVER_HOST Serveur LDAP
192.168.1.50
LDAP_SERVER_PORT Port LDAP 389
@@ -277,9 +277,9 @@
print "<br>";
}
- // Test ldap_getversion
if ($ds)
{
+ // Test ldap_getversion
if ((dolibarr_ldap_getversion($ds) == 3))
{
print img_picto('','info');
@@ -290,10 +290,10 @@
print img_picto('','info');
print
$langs->trans("LDAPSetupForVersion2").'<br>';
}
- }
// Test ldap_bind
$bind = @dolibarr_ldap_bind($ds);
+
if ($bind)
{
print img_picto('','info');
@@ -302,14 +302,14 @@
else
{
print img_picto('','alerte');
-
print "Connexion au dn $dn raté : ";
- print ldap_error($ds);
+ print $bind->err;
print "<br>";
}
// Test ldap_unbind
$unbind = @dolibarr_ldap_unbind($ds);
+
if ($bind)
{
print img_picto('','info');
@@ -318,15 +318,15 @@
else
{
print img_picto('','alerte');
-
print "Déconnection du dn $dn raté";
print "<br>";
}
}
+ }
}
$db->close();
-llxFooter('$Date: 2006/06/12 12:55:04 $ - $Revision: 1.44 $');
+llxFooter('$Date: 2006/06/12 13:14:02 $ - $Revision: 1.45 $');
?>
Index: lib/ldap.lib.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/lib/ldap.lib.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -b -r1.29 -r1.30
--- lib/ldap.lib.php 12 Jun 2006 12:55:04 -0000 1.29
+++ lib/ldap.lib.php 12 Jun 2006 13:14:02 -0000 1.30
@@ -19,7 +19,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* or see http://www.gnu.org/
*
- * $Id: ldap.lib.php,v 1.29 2006/06/12 12:55:04 hregis Exp $
+ * $Id: ldap.lib.php,v 1.30 2006/06/12 13:14:02 hregis Exp $
* $Source: /cvsroot/dolibarr/dolibarr/htdocs/lib/ldap.lib.php,v $
*/
@@ -28,7 +28,7 @@
\brief Librairie contenant les fonctions pour accèder
au serveur ldap.
\author Rodolphe Quiedeville.
\author Benoit Mortier.
- \version $Revision: 1.29 $
+ \version $Revision: 1.30 $
Ensemble des fonctions permettant d'accèder à un serveur LDAP.
*/
@@ -61,7 +61,7 @@
}
else
{
- $this->err .= ldap_error($ldapconnect);
+ $this->err = ldap_error($ldapconnect);
}
}
@@ -80,7 +80,14 @@
$ldapbind = ldap_bind($ds, $conf->global->LDAP_ADMIN_DN,
$conf->global->LDAP_ADMIN_PASS);
}
+ if ($ldapbind)
+ {
return $ldapbind;
+ }
+ else
+ {
+ $this->err = ldap_error($ldapbind);
+ }
}
/**