diff options
Diffstat (limited to 'program/steps')
-rw-r--r-- | program/steps/addressbook/delete.inc | 3 | ||||
-rw-r--r-- | program/steps/addressbook/func.inc | 4 | ||||
-rw-r--r-- | program/steps/addressbook/list.inc | 6 | ||||
-rw-r--r-- | program/steps/addressbook/search.inc | 3 | ||||
-rw-r--r-- | program/steps/addressbook/show.inc | 2 | ||||
-rw-r--r-- | program/steps/mail/autocomplete.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/compose.inc | 8 | ||||
-rw-r--r-- | program/steps/mail/func.inc | 4 | ||||
-rw-r--r-- | program/steps/mail/list_contacts.inc | 3 | ||||
-rw-r--r-- | program/steps/mail/show.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/folders.inc | 2 | ||||
-rw-r--r-- | program/steps/settings/func.inc | 2 |
12 files changed, 24 insertions, 19 deletions
diff --git a/program/steps/addressbook/delete.inc b/program/steps/addressbook/delete.inc index a2f12495c..81b8a0970 100644 --- a/program/steps/addressbook/delete.inc +++ b/program/steps/addressbook/delete.inc @@ -70,6 +70,7 @@ $page = isset($_SESSION['page']) ? $_SESSION['page'] : 1; // update saved search after data changed if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$search_request])) { $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); + $afields = $RCMAIL->config->get('contactlist_fields'); $search = (array)$_SESSION['search'][$search_request]; $records = array(); @@ -83,7 +84,7 @@ if (($search_request = $_REQUEST['_search']) && isset($_SESSION['search'][$searc $source->set_search_set($set); // get records - $result = $source->list_records(array('name', 'firstname', 'surname', 'email')); + $result = $source->list_records($afields); if (!$result->count) { unset($search[$s]); diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc index a612d7c11..8abf061b8 100644 --- a/program/steps/addressbook/func.inc +++ b/program/steps/addressbook/func.inc @@ -368,7 +368,7 @@ function rcmail_contact_frame($attrib) $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); } @@ -705,7 +705,7 @@ function rcmail_contact_photo($attrib) 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']); diff --git a/program/steps/addressbook/list.inc b/program/steps/addressbook/list.inc index a24fb9520..06a1e10a3 100644 --- a/program/steps/addressbook/list.inc +++ b/program/steps/addressbook/list.inc @@ -19,6 +19,8 @@ +-----------------------------------------------------------------------+ */ +$afields = $RCMAIL->config->get('contactlist_fields'); + // Use search result if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search']])) { @@ -43,7 +45,7 @@ if (!empty($_REQUEST['_search']) && isset($_SESSION['search'][$_REQUEST['_search $source->set_search_set($set); // get records - $result = $source->list_records(array('name', 'firstname', 'surname', 'email')); + $result = $source->list_records($afields); while ($row = $result->next()) { $row['sourceid'] = $s; @@ -73,7 +75,7 @@ else { $CONTACTS = rcmail_contact_source(null, true); // get contacts for this user - $result = $CONTACTS->list_records(array('name', 'firstname', 'surname', 'email')); + $result = $CONTACTS->list_records($afields); if (!$result->count && $result->searchonly) { $OUTPUT->show_message('contactsearchonly', 'notice'); diff --git a/program/steps/addressbook/search.inc b/program/steps/addressbook/search.inc index f83eb9fd6..d31e54b1a 100644 --- a/program/steps/addressbook/search.inc +++ b/program/steps/addressbook/search.inc @@ -145,6 +145,7 @@ function rcmail_contact_search() $search_set = array(); $records = array(); $sort_col = $RCMAIL->config->get('addressbook_sort_col', 'name'); + $afields = $RCMAIL->config->get('contactlist_fields'); foreach ($sources as $s) { $source = $RCMAIL->get_address_book($s['id']); @@ -179,7 +180,7 @@ function rcmail_contact_search() } // get records - $result = $source->list_records(array('name', 'firstname', 'surname', 'email')); + $result = $source->list_records($afields); while ($row = $result->next()) { $row['sourceid'] = $s['id']; diff --git a/program/steps/addressbook/show.inc b/program/steps/addressbook/show.inc index d7f6f8f1d..48e37256d 100644 --- a/program/steps/addressbook/show.inc +++ b/program/steps/addressbook/show.inc @@ -85,7 +85,7 @@ if ($RCMAIL->action == 'photo') { $RCMAIL->output->future_expire_header(86400); header('Content-Type: ' . rc_image_content_type($data)); - echo $data ? $data : file_get_contents('program/blank.gif'); + echo $data ? $data : file_get_contents('program/resources/blank.gif'); exit; } diff --git a/program/steps/mail/autocomplete.inc b/program/steps/mail/autocomplete.inc index ba34fa5aa..55579814c 100644 --- a/program/steps/mail/autocomplete.inc +++ b/program/steps/mail/autocomplete.inc @@ -26,7 +26,7 @@ if ($RCMAIL->action == 'group-expand') { $members = array(); $abook->set_group($gid); $abook->set_pagesize(1000); // TODO: limit number of group members by config - $result = $abook->list_records(array('name', 'firstname', 'surname', 'email')); + $result = $abook->list_records($RCMAIL->config->get('contactlist_fields')); while ($result && ($sql_arr = $result->iterate())) { foreach ((array)$sql_arr['email'] as $email) { $members[] = format_email_recipient($email, rcube_addressbook::compose_list_name($sql_arr)); @@ -64,7 +64,7 @@ if (!empty($book_types) && strlen($search)) { $abook = $RCMAIL->get_address_book($id); $abook->set_pagesize($MAXNUM); - if ($result = $abook->search(array('name', 'firstname', 'surname', 'email'), $search, $mode, true, true, 'email')) { + if ($result = $abook->search($RCMAIL->config->get('contactlist_fields'), $search, $mode, true, true, 'email')) { while ($sql_arr = $result->iterate()) { // Contact can have more than one e-mail address $email_arr = (array)$abook->get_col_values('email', $sql_arr, true); diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc index ccb72269a..0b06389b7 100644 --- a/program/steps/mail/compose.inc +++ b/program/steps/mail/compose.inc @@ -663,10 +663,10 @@ function rcmail_prepare_message_body() unset($plugin); // add blocked.gif attachment (#1486516) - if ($isHtml && preg_match('#<img src="\./program/blocked\.gif"#', $body)) { - if ($attachment = rcmail_save_image('program/blocked.gif', 'image/gif')) { + if ($isHtml && preg_match('#<img src="\./program/resources/blocked\.gif"#', $body)) { + if ($attachment = rcmail_save_image('program/resources/blocked.gif', 'image/gif')) { $COMPOSE['attachments'][$attachment['id']] = $attachment; - $body = preg_replace('#\./program/blocked\.gif#', + $body = preg_replace('#\./program/resources/blocked\.gif#', $RCMAIL->comm_path.'&_action=display-attachment&_file=rcmfile'.$attachment['id'].'&_id='.$COMPOSE['id'], $body); } @@ -860,7 +860,7 @@ function rcmail_compose_body($attrib) $OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set)); } - $out .= "\n".'<iframe name="savetarget" src="program/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>'; + $out .= "\n".'<iframe name="savetarget" src="program/resources/blank.gif" style="width:0;height:0;border:none;visibility:hidden;"></iframe>'; return $out; } diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 21fa3e8aa..ddd34315a 100644 --- a/program/steps/mail/func.inc +++ b/program/steps/mail/func.inc @@ -398,7 +398,7 @@ function rcmail_messagecontent_frame($attrib) if ($RCMAIL->config->get('preview_pane')) $OUTPUT->set_env('contentframe', $attrib['id']); - $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); } @@ -610,7 +610,7 @@ function rcmail_wash_html($html, $p, $cid_replaces) $wash_opts = array( 'show_washed' => false, 'allow_remote' => $p['safe'], - 'blocked_src' => "./program/blocked.gif", + 'blocked_src' => "./program/resources/blocked.gif", 'charset' => RCMAIL_CHARSET, 'cid_map' => $cid_replaces, 'html_elements' => array('body'), diff --git a/program/steps/mail/list_contacts.inc b/program/steps/mail/list_contacts.inc index 1a6480339..7c99a1309 100644 --- a/program/steps/mail/list_contacts.inc +++ b/program/steps/mail/list_contacts.inc @@ -57,7 +57,8 @@ if ($CONTACTS && $CONTACTS->ready) { // get contacts for this user $CONTACTS->set_group(0); - $result = $CONTACTS->list_records(array('name', 'firstname', 'surname', 'email')); + $afields = $RCMAIL->config->get('contactlist_fields'); + $result = $CONTACTS->list_records($afields); if (!$result->count && $result->searchonly) { $OUTPUT->show_message('contactsearchonly', 'notice'); diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc index 9f0f7ba30..82c826108 100644 --- a/program/steps/mail/show.inc +++ b/program/steps/mail/show.inc @@ -274,7 +274,7 @@ function rcmail_message_contactphoto($attrib) if ($MESSAGE->sender) $photo_img = $RCMAIL->url(array('_task' => 'addressbook', '_action' => 'photo', '_email' => $MESSAGE->sender['mailto'], '_alt' => $placeholder)); else - $photo_img = $placeholder ? $placeholder : 'program/blank.gif'; + $photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif'; return html::img(array('src' => $photo_img) + $attrib); } diff --git a/program/steps/settings/folders.inc b/program/steps/settings/folders.inc index e4e9f3155..2691a6e26 100644 --- a/program/steps/settings/folders.inc +++ b/program/steps/settings/folders.inc @@ -363,7 +363,7 @@ function rcmail_folder_frame($attrib) $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); } diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc index f44a96dab..3f5ef5390 100644 --- a/program/steps/settings/func.inc +++ b/program/steps/settings/func.inc @@ -34,7 +34,7 @@ function rcmail_preferences_frame($attrib) $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); } |