summaryrefslogtreecommitdiff
path: root/roundcubemail/program
diff options
context:
space:
mode:
authoralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-24 18:46:37 +0000
committeralec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c>2011-06-24 18:46:37 +0000
commit8e287248b8d427a09f8955648bbe3451f97ea022 (patch)
tree14d2ab5870767f2ebf4c339bfe4e9c3a90f73f26 /roundcubemail/program
parentcc019a67c27bc28c15477a23dbe6ad17cf9b6ee9 (diff)
- Fix contacts copying (#1487967)
git-svn-id: https://svn.roundcube.net/trunk@4878 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/program')
-rw-r--r--roundcubemail/program/steps/addressbook/copy.inc2
-rw-r--r--roundcubemail/program/steps/addressbook/func.inc7
2 files changed, 3 insertions, 6 deletions
diff --git a/roundcubemail/program/steps/addressbook/copy.inc b/roundcubemail/program/steps/addressbook/copy.inc
index 4ee885b3f..1e4e753b6 100644
--- a/roundcubemail/program/steps/addressbook/copy.inc
+++ b/roundcubemail/program/steps/addressbook/copy.inc
@@ -40,7 +40,7 @@ foreach ($cids as $source => $cid)
// It maight happen when copying records from search result
// Do nothing, go to next source
- if ($target == $source) {
+ if ((string)$target == (string)$source) {
continue;
}
diff --git a/roundcubemail/program/steps/addressbook/func.inc b/roundcubemail/program/steps/addressbook/func.inc
index 0f2d75705..f7f3dbfe9 100644
--- a/roundcubemail/program/steps/addressbook/func.inc
+++ b/roundcubemail/program/steps/addressbook/func.inc
@@ -670,7 +670,7 @@ function rcmail_get_cids()
// 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,10 +686,7 @@ function rcmail_get_cids()
if (!$got_source) {
list ($c, $s) = explode('-', $id, 2);
if (strlen($s)) {
- $result[$s][] = $c;
- }
- else if (strlen($source)) {
- $result[$source][] = $c;
+ $result[(string)$s][] = $c;
}
}
else {