- Fix contacts copying (#1487967)
| | |
| | | |
| | | // It maight happen when copying records from search result |
| | | // Do nothing, go to next source |
| | | if ($target == $source) { |
| | | if ((string)$target == (string)$source) { |
| | | continue; |
| | | } |
| | | |
| | |
| | | // 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(); |
| | |
| | | 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 { |