| | |
| | | $OUTPUT->set_env('search_mods', $search_mods); |
| | | $OUTPUT->set_env('address_sources', $js_list); |
| | | $OUTPUT->set_env('writable_source', $writeable); |
| | | $OUTPUT->set_env('compose_extwin', $RCMAIL->config->get('compose_extwin',false)); |
| | | |
| | | $OUTPUT->set_pagetitle($RCMAIL->gettext('addressbook')); |
| | | $_SESSION['addressbooks_count'] = $count; |
| | |
| | | $OUTPUT->include_script('treelist.js'); |
| | | |
| | | // add some labels to client |
| | | $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting', 'addingmember', 'removingmember'); |
| | | $OUTPUT->add_label('deletegroupconfirm', 'groupdeleting', 'addingmember', 'removingmember', |
| | | 'newgroup', 'grouprename', 'searchsave', 'namex', 'save' |
| | | ); |
| | | |
| | | return html::tag('ul', $attrib, $out, html::$common_attrib); |
| | | } |
| | |
| | | |
| | | // Saved searches |
| | | $sources = $RCMAIL->user->list_searches(rcube_user::SEARCH_ADDRESSBOOK); |
| | | foreach ($sources as $j => $source) { |
| | | $id = $source['id']; |
| | | foreach ($sources as $source) { |
| | | $id = $source['id']; |
| | | $js_id = rcube::JQ($id); |
| | | |
| | | // set class name(s) |
| | |
| | | if ($result = $CONTACTS->get_result()) |
| | | $record = $result->first(); |
| | | |
| | | $photo_img = $attrib['placeholder'] ? $RCMAIL->output->get_skin_file($attrib['placeholder']) : 'program/resources/blank.gif'; |
| | | $photo_img = $attrib['placeholder'] ? $RCMAIL->output->abs_url($attrib['placeholder'], true) : 'program/resources/blank.gif'; |
| | | if ($record['_type'] == 'group' && $attrib['placeholdergroup']) |
| | | $photo_img = $RCMAIL->output->get_skin_file($attrib['placeholdergroup']); |
| | | $photo_img = $RCMAIL->output->abs_url($attrib['placeholdergroup'], true); |
| | | |
| | | $RCMAIL->output->set_env('photo_placeholder', $photo_img); |
| | | $RCMAIL->output->set_env('photo_placeholder', $RCMAIL->output->asset_url($photo_img)); |
| | | |
| | | unset($attrib['placeholder']); |
| | | |
| | | $plugin = $RCMAIL->plugins->exec_hook('contact_photo', array('record' => $record, 'data' => $record['photo'])); |
| | |
| | | } |
| | | $photo_img = $RCMAIL->url($url); |
| | | } |
| | | else |
| | | else { |
| | | $ff_value = '-del-'; // will disable delete-photo action |
| | | } |
| | | |
| | | $img = html::img(array('src' => $photo_img, 'border' => 1, 'alt' => $RCMAIL->gettext('contactphoto'))); |
| | | $content = html::div($attrib, $img); |
| | | $content = html::div($attrib, html::img(array( |
| | | 'src' => $photo_img, |
| | | 'alt' => $RCMAIL->gettext('contactphoto'), |
| | | 'onerror' => 'this.src = rcmail.env.photo_placeholder', |
| | | ))); |
| | | |
| | | if ($CONTACT_COLTYPES['photo'] && ($RCMAIL->action == 'edit' || $RCMAIL->action == 'add')) { |
| | | $RCMAIL->output->add_gui_object('contactphoto', $attrib['id']); |
| | |
| | | * |
| | | * @return array List of contact IDs per-source |
| | | */ |
| | | function rcmail_get_cids($filter = null) |
| | | function rcmail_get_cids($filter = null, $request_type = rcube_utils::INPUT_GPC) |
| | | { |
| | | // contact ID (or comma-separated list of IDs) is provided in two |
| | | // forms. If _source is an empty string then the ID is a string |
| | | // containing contact ID and source name in form: <ID>-<SOURCE> |
| | | |
| | | $cid = rcube_utils::get_input_value('_cid', rcube_utils::INPUT_GPC); |
| | | $cid = rcube_utils::get_input_value('_cid', $request_type); |
| | | $source = (string) rcube_utils::get_input_value('_source', rcube_utils::INPUT_GPC); |
| | | |
| | | if (is_array($cid)) { |