summaryrefslogtreecommitdiff
path: root/program
diff options
context:
space:
mode:
Diffstat (limited to 'program')
-rw-r--r--program/include/main.inc17
-rw-r--r--program/steps/addressbook/edit.inc3
-rw-r--r--program/steps/addressbook/func.inc2
-rw-r--r--program/steps/mail/compose.inc4
-rw-r--r--program/steps/mail/func.inc13
-rw-r--r--program/steps/mail/show.inc9
-rw-r--r--program/steps/settings/func.inc2
7 files changed, 15 insertions, 35 deletions
diff --git a/program/include/main.inc b/program/include/main.inc
index 23c2c2822..ee847470b 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -133,20 +133,6 @@ function rcmail_url($action, $p=array(), $task=null)
/**
- * Add a localized label to the client environment
- * @deprecated
- */
-function rcube_add_label()
- {
- global $OUTPUT;
-
- $arg_list = func_get_args();
- foreach ($arg_list as $i => $name)
- $OUTPUT->add_label($name);
- }
-
-
-/**
* Garbage collector function for temp files.
* Remove temp files older than two days
*/
@@ -913,8 +899,7 @@ function rcmail_mailbox_list($attrib)
$attrib += array('maxlength' => 100, 'relanames' => false);
// add some labels to client
- rcube_add_label('purgefolderconfirm');
- rcube_add_label('deletemessagesconfirm');
+ $RCMAIL->output->add_label('purgefolderconfirm', 'deletemessagesconfirm');
$type = $attrib['type'] ? $attrib['type'] : 'ul';
unset($attrib['type']);
diff --git a/program/steps/addressbook/edit.inc b/program/steps/addressbook/edit.inc
index 61c660d94..410a09b14 100644
--- a/program/steps/addressbook/edit.inc
+++ b/program/steps/addressbook/edit.inc
@@ -43,8 +43,7 @@ function rcmail_contact_editform($attrib)
}
// add some labels to client
- rcube_add_label('noemailwarning');
- rcube_add_label('nonamewarning');
+ $OUTPUT->add_label('noemailwarning', 'nonamewarning');
list($form_start, $form_end) = get_form_tags($attrib);
unset($attrib['form']);
diff --git a/program/steps/addressbook/func.inc b/program/steps/addressbook/func.inc
index 41995026d..33dfad646 100644
--- a/program/steps/addressbook/func.inc
+++ b/program/steps/addressbook/func.inc
@@ -114,7 +114,7 @@ function rcmail_contacts_list($attrib)
$OUTPUT->include_script('list.js');
// add some labels to client
- rcube_add_label('deletecontactconfirm');
+ $OUTPUT->add_label('deletecontactconfirm');
return $out;
}
diff --git a/program/steps/mail/compose.inc b/program/steps/mail/compose.inc
index 8f4bc9f9b..9fe4a686c 100644
--- a/program/steps/mail/compose.inc
+++ b/program/steps/mail/compose.inc
@@ -81,7 +81,7 @@ if (!is_array($_SESSION['compose']) || $_SESSION['compose']['id'] != get_input_v
}
// add some labels to client
-rcube_add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
+$OUTPUT->add_label('nosubject', 'nosenderwarning', 'norecipientwarning', 'nosubjectwarning', 'nobodywarning', 'notsentwarning', 'savingmessage', 'sendingmessage', 'messagesaved', 'converting');
// add config parameter to client script
$OUTPUT->set_env('draft_autosave', !empty($CONFIG['drafts_mbox']) ? $CONFIG['draft_autosave'] : 0);
@@ -477,7 +477,7 @@ function rcmail_compose_body($attrib)
$attrib['id'],
JS_OBJECT_NAME), 'foot');
- rcube_add_label('checking');
+ $OUTPUT->add_label('checking');
$OUTPUT->set_env('spellcheck_langs', join(',', $editor_lang_set));
}
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index b7ef82ceb..a5ffb9d7b 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -69,19 +69,10 @@ if (empty($RCMAIL->action) || $RCMAIL->action == 'list')
$OUTPUT->set_env('junk_mailbox', $CONFIG['junk_mbox']);
if (!$OUTPUT->ajax_call)
- rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
+ $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
$OUTPUT->set_pagetitle(rcmail_localize_foldername($IMAP->get_mailbox_name()));
}
-else if ($RCMAIL->action == 'show')
- {
- // set current mailbox in client environment
- $OUTPUT->set_env('mailbox', $IMAP->get_mailbox_name());
- if ($CONFIG['trash_mbox'])
- $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
- if (!$OUTPUT->ajax_call)
- rcube_add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
- }
/**
@@ -99,7 +90,7 @@ function rcmail_message_list($attrib)
$sort_order = $_SESSION['sort_order'];
// add some labels to client
- rcube_add_label('from', 'to');
+ $OUTPUT->add_label('from', 'to');
// get message headers
$a_headers = $IMAP->list_headers('', '', $sort_col, $sort_order);
diff --git a/program/steps/mail/show.inc b/program/steps/mail/show.inc
index 941c3cce2..d8478d569 100644
--- a/program/steps/mail/show.inc
+++ b/program/steps/mail/show.inc
@@ -71,11 +71,16 @@ if ($_GET['_uid']) {
// give message uid to the client
$OUTPUT->set_env('uid', $MESSAGE->uid);
+ // set environement
$OUTPUT->set_env('safemode', $MESSAGE->is_safe);
$OUTPUT->set_env('sender', $MESSAGE->sender['string']);
$OUTPUT->set_env('permaurl', rcmail_url('show', array('_uid' => $MESSAGE->uid, '_mbox' => $mbox_name)));
$OUTPUT->set_env('mailbox', $mbox_name);
-
+ if ($CONFIG['trash_mbox'])
+ $OUTPUT->set_env('trash_mailbox', $CONFIG['trash_mbox']);
+ if (!$OUTPUT->ajax_call)
+ $OUTPUT->add_label('checkingmail', 'deletemessage', 'movemessagetotrash', 'movingmessage');
+
// check for unset disposition notification
if ($MESSAGE->headers->mdn_to &&
!$MESSAGE->headers->mdn_sent &&
@@ -92,7 +97,7 @@ if ($_GET['_uid']) {
}
else if (empty($CONFIG['mdn_requests']))
{
- rcube_add_label('mdnrequest');
+ $OUTPUT->add_label('mdnrequest');
$OUTPUT->set_env('mdn_request', true);
}
}
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index e98ce1b47..6e8c6b509 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -30,7 +30,7 @@ function rcmail_user_prefs_form($attrib)
$no_override = is_array($config['dont_override']) ? array_flip($config['dont_override']) : array();
// add some labels to client
- rcube_add_label('nopagesizewarning');
+ $RCMAIL->output->add_label('nopagesizewarning');
list($form_start, $form_end) = get_form_tags($attrib, 'save-prefs');
unset($attrib['form']);