[Svn] r4878 - trunk/roundcubemail/program/steps/addressbook

trac at roundcube.net trac at roundcube.net
Fri Jun 24 20:46:37 CEST 2011


Author: alec
Date: 2011-06-24 13:46:37 -0500 (Fri, 24 Jun 2011)
New Revision: 4878

Modified:
   trunk/roundcubemail/program/steps/addressbook/copy.inc
   trunk/roundcubemail/program/steps/addressbook/func.inc
Log:
- Fix contacts copying (#1487967)


Modified: trunk/roundcubemail/program/steps/addressbook/copy.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/copy.inc	2011-06-24 18:17:18 UTC (rev 4877)
+++ trunk/roundcubemail/program/steps/addressbook/copy.inc	2011-06-24 18:46:37 UTC (rev 4878)
@@ -40,7 +40,7 @@
 
     // It maight happen when copying records from search result
     // Do nothing, go to next source
-    if ($target == $source) {
+    if ((string)$target == (string)$source) {
         continue;
     }
 

Modified: trunk/roundcubemail/program/steps/addressbook/func.inc
===================================================================
--- trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-24 18:17:18 UTC (rev 4877)
+++ trunk/roundcubemail/program/steps/addressbook/func.inc	2011-06-24 18:46:37 UTC (rev 4878)
@@ -670,7 +670,7 @@
     // containing contact ID and source name in form: <ID>-<SOURCE>
 
     $cid    = get_input_value('_cid', RCUBE_INPUT_GPC);
-    $source = get_input_value('_source', RCUBE_INPUT_GPC);
+    $source = (string) get_input_value('_source', RCUBE_INPUT_GPC);
 
     if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)) {
         return array();
@@ -686,11 +686,8 @@
         if (!$got_source) {
             list ($c, $s) = explode('-', $id, 2);
             if (strlen($s)) {
-                $result[$s][] = $c;
+                $result[(string)$s][] = $c;
             }
-            else if (strlen($source)) {
-                $result[$source][] = $c;
-            }
         }
         else {
             $result[$source][] = $id;

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



More information about the Svn mailing list