diff options
Diffstat (limited to 'program/steps/mail/func.inc')
-rw-r--r-- | program/steps/mail/func.inc | 33 |
1 files changed, 19 insertions, 14 deletions
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc index 5a18ded6b..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); } @@ -518,21 +518,26 @@ function rcmail_check_safe(&$message) { global $RCMAIL; - $show_images = $RCMAIL->config->get('show_images'); if (!$message->is_safe - && !empty($show_images) - && $message->has_html_part()) - { - switch($show_images) { - case '1': // known senders only - $CONTACTS = new rcube_contacts($RCMAIL->db, $_SESSION['user_id']); - if ($CONTACTS->search('email', $message->sender['mailto'], true, false)->count) { - $message->set_safe(true); + && ($show_images = $RCMAIL->config->get('show_images')) + && $message->has_html_part() + ) { + switch ($show_images) { + case 1: // known senders only + // get default addressbook, like in addcontact.inc + $CONTACTS = $RCMAIL->get_address_book(-1, true); + + if ($CONTACTS) { + $result = $CONTACTS->search('email', $message->sender['mailto'], 1, false); + if ($result->count) { + $message->set_safe(true); + } } - break; - case '2': // always + break; + + case 2: // always $message->set_safe(true); - break; + break; } } } @@ -605,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'), |