dolibarr-cvs
[Top][All Lists]
Advanced

[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 14:55:45 +0000

CVSROOT:        /cvsroot/dolibarr
Module name:    dolibarr
Changes by:     Regis Houssin <hregis>  06/06/12 14:55:45

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.46&r2=1.47
http://cvs.savannah.gnu.org/viewcvs/dolibarr/htdocs/lib/ldap.lib.php?cvsroot=dolibarr&r1=1.31&r2=1.32

Patches:
Index: admin/ldap.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/admin/ldap.php,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -b -r1.46 -r1.47
--- admin/ldap.php      12 Jun 2006 14:05:23 -0000      1.46
+++ admin/ldap.php      12 Jun 2006 14:55:44 -0000      1.47
@@ -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.46 2006/06/12 14:05:23 hregis Exp $
+ * $Id: ldap.php,v 1.47 2006/06/12 14:55:44 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.46 $
+               \version    $Revision: 1.47 $
         \remarks    Exemple configuration :
                     LDAP_SERVER_HOST    Serveur LDAP                 
192.168.1.50
                     LDAP_SERVER_PORT    Port LDAP             389
@@ -263,6 +263,8 @@
        {
                $ldap = new Ldap();
                // Test ldap_connect
+               // ce test n'est pas fiable car une ressource est constamment 
retournée
+               // il faut se fier au test ldap_bind
                $ds = $ldap->dolibarr_ldap_connect();
                if ($ds)
                {
@@ -328,6 +330,6 @@
 
 $db->close();
 
-llxFooter('$Date: 2006/06/12 14:05:23 $ - $Revision: 1.46 $');
+llxFooter('$Date: 2006/06/12 14:55:44 $ - $Revision: 1.47 $');
 
 ?>

Index: lib/ldap.lib.php
===================================================================
RCS file: /cvsroot/dolibarr/dolibarr/htdocs/lib/ldap.lib.php,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- lib/ldap.lib.php    12 Jun 2006 14:05:23 -0000      1.31
+++ lib/ldap.lib.php    12 Jun 2006 14:55:44 -0000      1.32
@@ -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.31 2006/06/12 14:05:23 hregis Exp $
+ * $Id: ldap.lib.php,v 1.32 2006/06/12 14:55:44 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.31 $
+               \version        $Revision: 1.32 $
 
                Ensemble des fonctions permettant d'accèder à un serveur LDAP.
 */
@@ -70,12 +70,8 @@
        if ($ldapconnect)
        {
                ldap_set_option($ldapconnect, LDAP_OPT_PROTOCOL_VERSION, 
$conf->global->LDAP_SERVER_PROTOCOLVERSION);
-               return $ldapconnect;
-       }
-       else
-       {
-               $this->err = ldap_error($ldapconnect);
        }
+       return $ldapconnect;
 }
 
 
@@ -90,7 +86,7 @@
        
        if (defined("LDAP_ADMIN_PASS") && $conf->global->LDAP_ADMIN_DN && 
$conf->global->LDAP_ADMIN_PASS)
     {
-       $ldapbind = ldap_bind($ds, $conf->global->LDAP_ADMIN_DN, 
$conf->global->LDAP_ADMIN_PASS);
+       $ldapbind = @ldap_bind($ds, $conf->global->LDAP_ADMIN_DN, 
$conf->global->LDAP_ADMIN_PASS);
     }
   
   if ($ldapbind)
@@ -110,7 +106,7 @@
 */
 function dolibarr_ldap_unbind($ds)
 {
-       $ldapunbind = ldap_unbind($ds);
+       $ldapunbind = @ldap_unbind($ds);
 
        return $ldapunbind;
 }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]