diff options
| author | Carson Fleming <[email protected]> | 2024-12-31 18:47:28 -0800 |
|---|---|---|
| committer | Carson Fleming <[email protected]> | 2024-12-31 18:47:28 -0800 |
| commit | 389139c1749904477a22644248ba25f46485827e (patch) | |
| tree | e978295357261ee2256ff167c0908cb3a874a0d4 /inbox_settings.php | |
| parent | 27cfb2476d94f93bbb1839d179f473bf0e5ef9ec (diff) | |
| download | rc-inbox-settings-389139c1749904477a22644248ba25f46485827e.tar.gz | |
skeleton of the final vision
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() { |
