summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/archive/archive.js6
-rw-r--r--plugins/archive/archive.php26
2 files changed, 4 insertions, 28 deletions
diff --git a/plugins/archive/archive.js b/plugins/archive/archive.js
index ce5d0f5e2..a83750819 100644
--- a/plugins/archive/archive.js
+++ b/plugins/archive/archive.js
@@ -8,10 +8,8 @@ function rcmail_archive(prop)
if (!rcmail.env.uid && (!rcmail.message_list || !rcmail.message_list.get_selection().length))
return;
- var uids = rcmail.env.uid ? rcmail.env.uid : rcmail.message_list.get_selection().join(','),
- lock = rcmail.set_busy(true, 'loading');
-
- rcmail.http_post('plugin.archive', '_uid='+uids+'&_mbox='+urlencode(rcmail.env.mailbox), lock);
+ if (rcmail.env.mailbox != rcmail.env.archive_folder)
+ rcmail.command('moveto', rcmail.env.archive_folder);
}
// callback for app-onload event
diff --git a/plugins/archive/archive.php b/plugins/archive/archive.php
index bd18aa4ed..fbb01296d 100644
--- a/plugins/archive/archive.php
+++ b/plugins/archive/archive.php
@@ -17,8 +17,6 @@ class archive extends rcube_plugin
{
$rcmail = rcmail::get_instance();
- $this->register_action('plugin.archive', array($this, 'request_action'));
-
// There is no "Archived flags"
// $GLOBALS['IMAP_FLAGS']['ARCHIVED'] = 'Archive';
if ($rcmail->task == 'mail' && ($rcmail->action == '' || $rcmail->action == 'show')
@@ -80,34 +78,14 @@ class archive extends rcube_plugin
foreach ($list as $idx => $item) {
if ($item['id'] == $folder) {
$list[$idx]['name'] = $new_name;
- return true;
+ return true;
} else if (!empty($item['folders']))
if ($this->_mod_folder_name($list[$idx]['folders'], $folder, $new_name))
- return true;
+ return true;
}
return false;
}
- function request_action()
- {
- $this->add_texts('localization');
-
- $uids = get_input_value('_uid', RCUBE_INPUT_POST);
- $mbox = get_input_value('_mbox', RCUBE_INPUT_POST);
-
- $rcmail = rcmail::get_instance();
-
- // There is no "Archive flags", but I left this line in case it may be useful
- // $rcmail->imap->set_flag($uids, 'ARCHIVE');
-
- if (($archive_mbox = $rcmail->config->get('archive_mbox')) && $mbox != $archive_mbox) {
- $rcmail->output->command('move_messages', $archive_mbox);
- $rcmail->output->command('display_message', $this->gettext('archived'), 'confirmation');
- }
-
- $rcmail->output->send();
- }
-
function prefs_table($args)
{
global $CURR_SECTION;