summaryrefslogtreecommitdiff
path: root/program/steps/mail
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps/mail')
-rw-r--r--program/steps/mail/check_recent.inc4
-rw-r--r--program/steps/mail/compose.inc24
-rw-r--r--program/steps/mail/func.inc14
-rw-r--r--program/steps/mail/show.inc8
4 files changed, 23 insertions, 27 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index b95819415..4e3b15648 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -28,6 +28,8 @@ if (empty($_POST['_folderlist']) && empty($_POST['_list'])) {
$trash = $RCMAIL->config->get('trash_mbox');
$current = $RCMAIL->storage->get_folder();
$check_all = $RCMAIL->action != 'refresh' || (bool)$RCMAIL->config->get('check_all_folders');
+$page = $RCMAIL->storage->get_page();
+$page_size = $RCMAIL->storage->get_pagesize();
$search_request = rcube_utils::get_input_value('_search', rcube_utils::INPUT_GPC);
if ($search_request && $_SESSION['search_request'] != $search_request) {
@@ -97,8 +99,6 @@ foreach ($a_mailboxes as $mbox_name) {
// did a refresh but only in list mode
$list_mode = $RCMAIL->storage->get_threading() ? 'THREADS' : 'ALL';
$all_count = $RCMAIL->storage->count($mbox_name, $list_mode, $list_mode == 'THREADS', false);
- $page = $RCMAIL->storage->get_page();
- $page_size = $RCMAIL->storage->get_pagesize();
// check current page if we're not on the first page
if ($all_count && $page > 1) {
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 751729cc5..92296e525 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -131,8 +131,10 @@ else if ($msg_uid = $COMPOSE['param']['uid']) {
$compose_mode = RCUBE_COMPOSE_EDIT;
}
-$COMPOSE['mode'] = $compose_mode;
-$OUTPUT->set_env('compose_mode', $compose_mode);
+if ($compose_mode) {
+ $COMPOSE['mode'] = $compose_mode;
+ $OUTPUT->set_env('compose_mode', $compose_mode);
+}
if ($compose_mode == RCUBE_COMPOSE_EDIT || $compose_mode == RCUBE_COMPOSE_DRAFT) {
// don't add signature in draft/edit mode, we'll also not remove the old-one
@@ -949,7 +951,7 @@ function rcmail_compose_body($attrib)
"googie.setCurrentLanguage('%s');\n".
"googie.setDecoration(false);\n".
"googie.decorateTextarea('%s');\n",
- $RCMAIL->output->get_skin_path(),
+ $RCMAIL->output->asset_url($RCMAIL->output->get_skin_path()),
$RCMAIL->url(array('_task' => 'utils', '_action' => 'spell', '_remote' => 1)),
!empty($dictionary) ? 'true' : 'false',
rcube::JQ(rcube::Q($RCMAIL->gettext('checkspelling'))),
@@ -1309,7 +1311,6 @@ function rcmail_write_forward_attachments()
}
else {
$data = $storage->get_raw_body($message->uid);
- $curr_mem += $message->size;
}
$attachment = array(
@@ -1493,15 +1494,14 @@ function rcmail_compose_attachment_list($attrib)
if (!$attrib['id'])
$attrib['id'] = 'rcmAttachmentList';
- $out = "\n";
- $jslist = array();
- $button = '';
- $skin_path = $RCMAIL->config->get('skin_path');
+ $out = "\n";
+ $jslist = array();
+ $button = '';
if (is_array($COMPOSE['attachments'])) {
if ($attrib['deleteicon']) {
$button = html::img(array(
- 'src' => $skin_path . $attrib['deleteicon'],
+ 'src' => $RCMAIL->output->abs_url($attrib['deleteicon'], true),
'alt' => $RCMAIL->gettext('delete')
));
}
@@ -1540,13 +1540,13 @@ function rcmail_compose_attachment_list($attrib)
}
if ($attrib['deleteicon'])
- $COMPOSE['deleteicon'] = $skin_path . $attrib['deleteicon'];
+ $COMPOSE['deleteicon'] = $RCMAIL->output->abs_url($attrib['deleteicon'], true);
else if (rcube_utils::get_boolean($attrib['textbuttons']))
$COMPOSE['textbuttons'] = true;
if ($attrib['cancelicon'])
- $OUTPUT->set_env('cancelicon', $skin_path . $attrib['cancelicon']);
+ $OUTPUT->set_env('cancelicon', $RCMAIL->output->abs_url($attrib['cancelicon'], true));
if ($attrib['loadingicon'])
- $OUTPUT->set_env('loadingicon', $skin_path . $attrib['loadingicon']);
+ $OUTPUT->set_env('loadingicon', $RCMAIL->output->abs_url($attrib['loadingicon'], true));
$OUTPUT->set_env('attachments', $jslist);
$OUTPUT->add_gui_object('attachmentlist', $attrib['id']);
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 167e30927..6423636f0 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -357,8 +357,6 @@ function rcmail_message_list($attrib)
if (!in_array('threads', $a_show_cols))
array_unshift($a_show_cols, 'threads');
- $_SESSION['skin_path'] = $RCMAIL->config->get('skin_path');
-
// set client env
$OUTPUT->add_gui_object('messagelist', $attrib['id']);
$OUTPUT->set_env('autoexpand_threads', intval($RCMAIL->config->get('autoexpand_threads')));
@@ -543,8 +541,6 @@ function rcmail_message_list_head($attrib, $a_show_cols)
{
global $RCMAIL;
- $skin_path = $_SESSION['skin_path'];
-
// check to see if we have some settings for sorting
$sort_col = $_SESSION['sort_col'];
$sort_order = $_SESSION['sort_order'];
@@ -566,7 +562,7 @@ function rcmail_message_list_head($attrib, $a_show_cols)
$onclick = 'return ' . rcmail_output::JS_OBJECT_NAME . ".command('menu-open', 'messagelistmenu', this, event)";
$inner = $RCMAIL->gettext('listoptions');
if (is_string($attrib['optionsmenuicon']) && $attrib['optionsmenuicon'] != 'true') {
- $inner = html::img(array('src' => $skin_path . $attrib['optionsmenuicon'], 'alt' => $RCMAIL->gettext('listoptions')));
+ $inner = html::img(array('src' => $RCMAIL->output->abs_url($attrib['optionsmenuicon'], true), 'alt' => $RCMAIL->gettext('listoptions')));
}
$list_menu = html::a(array(
'href' => '#list-options',
@@ -647,7 +643,7 @@ function rcmail_message_list_head($attrib, $a_show_cols)
*/
function rcmail_messagecontent_frame($attrib)
{
- global $OUTPUT, $RCMAIL;
+ global $OUTPUT;
if (empty($attrib['id']))
$attrib['id'] = 'rcmailcontentwindow';
@@ -1138,7 +1134,7 @@ function rcmail_localized_priority($value)
/**
* return block to show full message headers
*/
-function rcmail_message_full_headers($attrib, $headers=NULL)
+function rcmail_message_full_headers($attrib)
{
global $OUTPUT, $RCMAIL;
@@ -1623,7 +1619,7 @@ function rcmail_address_string($input, $max=null, $linked=false, $addicon=null,
rcmail_output::JS_OBJECT_NAME, rcube::JQ($string)),
),
html::img(array(
- 'src' => $RCMAIL->config->get('skin_path') . $addicon,
+ 'src' => $RCMAIL->output->abs_url($addicon, true),
'alt' => "Add contact",
)));
}
@@ -2051,7 +2047,7 @@ function rcmail_search_filter($attrib)
return $out;
}
-function rcmail_message_error($uid=null)
+function rcmail_message_error()
{
global $RCMAIL;
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 5adc97900..d9233a923 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -341,20 +341,20 @@ function rcmail_message_contactphoto($attrib)
{
global $RCMAIL, $MESSAGE;
- $placeholder = $attrib['placeholder'] ? $RCMAIL->config->get('skin_path') . $attrib['placeholder'] : null;
+ $placeholder = $attrib['placeholder'] ? $RCMAIL->output->abs_url($attrib['placeholder'], true) : null;
+ $placeholder = $RCMAIL->output->asset_url($placeholder ? $placeholder : 'program/resources/blank.gif');
if ($MESSAGE->sender) {
$photo_img = $RCMAIL->url(array(
'_task' => 'addressbook',
'_action' => 'photo',
'_email' => $MESSAGE->sender['mailto'],
- '_alt' => $placeholder,
));
- $attrib['onerror'] = "this.src = '" . ($placeholder ? $placeholder : 'program/resources/blank.gif') . "'";
+ $attrib['onerror'] = "this.src = '$placeholder'";
}
else {
- $photo_img = $placeholder ? $placeholder : 'program/resources/blank.gif';
+ $photo_img = $placeholder;
}
return html::img(array('src' => $photo_img, 'alt' => $RCMAIL->gettext('contactphoto')) + $attrib);