diff options
Diffstat (limited to 'inbox_settings.php')
| -rw-r--r-- | inbox_settings.php | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/inbox_settings.php b/inbox_settings.php index 24a3326..7b3ccce 100644 --- a/inbox_settings.php +++ b/inbox_settings.php @@ -196,18 +196,23 @@ class inbox_settings extends rcube_plugin { if (!isset($_POST['import'])) return false; + $dearmored_key_data = TODO_magic($_POST['key_data']); + $comment = $_POST['comment']; + foreach ($dearmored_key_data as $dearmored_key) { + $this->run_query('add_key', ['%k' => $dearmored_key, '%c' => $comment]); + } + + $this->rcmail->output->command( + 'display_message', $this->gettext('keys_imported'), 'notice'); return true; } function render_import_ui() { $this->rcmail->output->set_pagetitle($this->gettext('key_import')); - if ($this->import_keys()) { - $this->rcmail->output->command( - 'display_message', $this->gettext('keys_imported'), 'notice'); + if ($this->import_keys()) $this->rcmail->output->redirect('plugin.inbox_keys'); - } else { + else $this->rcmail->output->send('inbox_settings.key_import'); - } } function delete_selected_keys() { |
