[dev] ldap preferences patch

KaalH! kaalh@smol.org
Tue, 23 Jul 2002 16:59:41 +0200


oops ... this is the correct patch 

Index: ldap.php
===================================================================
RCS file: /repository/horde/lib/Prefs/ldap.php,v
retrieving revision 1.41
diff -u -r1.41 ldap.php
--- ldap.php    18 Jul 2002 18:42:54 -0000  1.41
+++ ldap.php    23 Jul 2002 13:39:39 -0000
@@ -352,7 +358,7 @@
         /* ldap_get_entries() converts attribute indexes to lowercase. */
         $field = strtolower($this->scope . 'prefs');

-        if (isset($result)) {
+        if (isset($result[0]['hordeprefs'])) {
             /* Set the requested values in the $this->prefs hash based on
                the contents of the LDAP result.

-- 
KaalH!


Surlignage KaalH! <kaalh@smol.org>:

> Fix error when preferences not exists in ldap tree
> 
> Index: ldap.php
> ===================================================================
> RCS file: /repository/horde/lib/Prefs/ldap.php,v
> retrieving revision 1.41
> diff -u -r1.41 ldap.php
> --- ldap.php    18 Jul 2002 18:42:54 -0000  1.41
> +++ ldap.php    23 Jul 2002 13:39:39 -0000
> @@ -352,7 +358,7 @@
>          /* ldap_get_entries() converts attribute indexes to lowercase. */
>          $field = strtolower($this->scope . 'prefs');
> 
> -        if (isset($result)) {
> +        if (isset($result[0][$field])) {
>              /* Set the requested values in the $this->prefs hash based on
>                 the contents of the LDAP result.
> 
> 
> -- 
> KaalH!
> 
> -- 
> Horde developers mailing list
> Frequently Asked Questions: http://horde.org/faq/
> To unsubscribe, mail: dev-unsubscribe@lists.horde.org