[Svn] r5389 - in trunk/roundcubemail: . program/steps/addressbook

trac at roundcube.net trac at roundcube.net
Fri Nov 4 10:08:54 CET 2011


Author: alec
Date: 2011-11-04 04:08:54 -0500 (Fri, 04 Nov 2011)
New Revision: 5389

Modified:
   trunk/roundcubemail/CHANGELOG
   trunk/roundcubemail/program/steps/addressbook/func.inc
Log:
- Fix error on opening searched LDAP contact (#1488144)


Modified: trunk/roundcubemail/CHANGELOG
===================================================================
--- trunk/roundcubemail/CHANGELOG	2011-11-03 17:51:54 UTC (rev 5388)
+++ trunk/roundcubemail/CHANGELOG	2011-11-04 09:08:54 UTC (rev 5389)
@@ -1,6 +1,7 @@
 CHANGELOG Roundcube Webmail
 ===========================
 
+- Fix error on opening searched LDAP contact (#1488144)
 - Fix redundant line break in flowed format (#1488146)
 - TinyMCE:
   - updated to 3.4.6

Modified: trunk/roundcubemail/program/steps/addressbook/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/func.inc	2011-11-03 17:51:54 UTC (rev 5388)
+++ trunk/roundcubemail/program/steps/addressbook/func.inc	2011-11-04 09:08:54 UTC (rev 5389)
@@ -763,9 +763,12 @@
     foreach ($cid as $id) {
         // if _source is not specified we'll find it from decoded ID
         if (!$got_source) {
-            list ($c, $s) = explode('-', $id, 2);
-            if (strlen($s)) {
-                $result[(string)$s][] = $c;
+            if ($sep = strrpos($id, '-')) {
+                $contact_id = substr($id, 0, $sep);
+                $source_id  = substr($id, $sep+1);
+                if (strlen($source_id)) {
+                    $result[(string)$source_id][] = $contact_id;
+                }
             }
         }
         else {

_______________________________________________
http://lists.roundcube.net/mailman/listinfo/svn



More information about the Svn mailing list