summaryrefslogtreecommitdiff
path: root/program/steps/addressbook/func.inc
diff options
context:
space:
mode:
authoralecpl <alec@alec.pl>2011-11-04 09:08:54 +0000
committeralecpl <alec@alec.pl>2011-11-04 09:08:54 +0000
commit179b39d22a68db1f31947aca4d31eb1e53d193a7 (patch)
tree8eceb5976f1c54f62a3f84fdccb36dfcae6f2aa2 /program/steps/addressbook/func.inc
parent9aab5e54568f6bc4071afd3ad0c5570abd98fa5c (diff)
- Fix error on opening searched LDAP contact (#1488144)
Diffstat (limited to 'program/steps/addressbook/func.inc')
-rw-r--r--program/steps/addressbook/func.inc9
1 files changed, 6 insertions, 3 deletions
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 2b06e62cd..79a0babb8 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -763,9 +763,12 @@ function rcmail_get_cids()
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 {