| | |
| | | +-----------------------------------------------------------------------+ |
| | | | Author: Thomas Bruederli <roundcube@gmail.com> | |
| | | +-----------------------------------------------------------------------+ |
| | | |
| | | $Id$ |
| | | |
| | | */ |
| | | |
| | | $SEARCH_MODS_DEFAULT = array('name'=>1, 'firstname'=>1, 'surname'=>1, 'email'=>1, '*'=>1); |
| | |
| | | 'rel' => '%s', |
| | | 'onclick' => "return ".JS_OBJECT_NAME.".command('list','%s',this)"), '%s')); |
| | | |
| | | $sources = (array) $OUTPUT->env['address_sources']; |
| | | $sources = (array) $OUTPUT->get_env('address_sources'); |
| | | reset($sources); |
| | | |
| | | // currently selected source |
| | |
| | | $attrib['name'] = $attrib['id']; |
| | | |
| | | $OUTPUT->set_env('contentframe', $attrib['name']); |
| | | $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/blank.gif'); |
| | | $OUTPUT->set_env('blankpage', $attrib['src'] ? $OUTPUT->abs_url($attrib['src']) : 'program/resources/blank.gif'); |
| | | |
| | | return html::iframe($attrib); |
| | | } |
| | |
| | | $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; |
| | |
| | | } |
| | | } |
| | | |
| | | if (!$content) |
| | | if (!$content && (!$edit_mode || !$select_add->_count)) |
| | | continue; |
| | | |
| | | // also render add-field selector |
| | |
| | | if ($result = $CONTACTS->get_result()) |
| | | $record = $result->first(); |
| | | |
| | | $photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/blank.gif'; |
| | | $photo_img = $attrib['placeholder'] ? $CONFIG['skin_path'] . $attrib['placeholder'] : 'program/resources/blank.gif'; |
| | | $RCMAIL->output->set_env('photo_placeholder', $photo_img); |
| | | unset($attrib['placeholder']); |
| | | |
| | | if (preg_match('!^https?://!i', $record['photo'])) |
| | | $plugin = $RCMAIL->plugins->exec_hook('contact_photo', array('record' => $record, 'data' => $record['photo'])); |
| | | |
| | | if ($plugin['url']) |
| | | $photo_img = $plugin['url']; |
| | | else if (preg_match('!^https?://!i', $record['photo'])) |
| | | $photo_img = $record['photo']; |
| | | else if ($record['photo']) |
| | | $photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $SOURCE_ID)); |