From 951c9b3abbf55ea16a5757d42af2522408b07293 Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Wed, 9 May 2012 13:45:37 +0200 Subject: Fix add_contact() (#1488465) --- program/steps/mail/func.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'program/steps') diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index aeb917bd7..854298d8b 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -1330,7 +1330,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null, if ($addicon && $_SESSION['writeable_abook']) { $address = html::span(null, $address . html::a(array( 'href' => "#add", - 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, urlencode($string)), + 'onclick' => sprintf("return %s.command('add-contact','%s',this)", JS_OBJECT_NAME, $string), 'title' => rcube_label('addtoaddressbook'), 'class' => 'rcmaddcontact', ), -- cgit v1.2.3 From 8253e7d245b03a2bfd5b51573e5d1024e45022ce Mon Sep 17 00:00:00 2001 From: Aleksander Machniak Date: Thu, 10 May 2012 19:14:39 +0200 Subject: Fix PHP warning on PHP 5.4 (#1488469) --- program/steps/addressbook/func.inc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'program/steps') diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index a31370b16..bd3819436 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -593,7 +593,12 @@ function rcmail_contact_form($form, $record, $attrib = null) $composite = array(); $j = 0; $template = $RCMAIL->config->get($col . '_template', '{'.join('} {', array_keys($colprop['childs'])).'}'); foreach ($colprop['childs'] as $childcol => $cp) { - $childvalue = $val[$childcol] ? $val[$childcol] : $val[$j]; + if (!empty($val) && is_array($val)) { + $childvalue = $val[$childcol] ? $val[$childcol] : $val[$j]; + } + else { + $childvalue = ''; + } if ($edit_mode) { if ($colprop['subtypes'] || $colprop['limit'] != 1) $cp['array'] = true; -- cgit v1.2.3