| | |
| | | } |
| | | } |
| | | else if ($action == 'setact' && !$error) { |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_POST, true); |
| | | $result = $this->activate_script($script_name); |
| | | $kep14 = $this->rc->config->get('managesieve_kolab_master'); |
| | | |
| | |
| | | } |
| | | } |
| | | else if ($action == 'deact' && !$error) { |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_POST, true); |
| | | $result = $this->deactivate_script($script_name); |
| | | |
| | | if ($result === true) { |
| | |
| | | } |
| | | } |
| | | else if ($action == 'setdel' && !$error) { |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_GPC, true); |
| | | $script_name = rcube_utils::get_input_value('_set', rcube_utils::INPUT_POST, true); |
| | | $result = $this->remove_script($script_name); |
| | | |
| | | if ($result === true) { |
| | |
| | | $this->rc->output->command('managesieve_updatelist', 'list', array('list' => $result)); |
| | | } |
| | | else if ($action == 'ruleadd') { |
| | | $rid = rcube_utils::get_input_value('_rid', rcube_utils::INPUT_GPC); |
| | | $rid = rcube_utils::get_input_value('_rid', rcube_utils::INPUT_POST); |
| | | $id = $this->genid(); |
| | | $content = $this->rule_div($fid, $id, false); |
| | | |
| | | $this->rc->output->command('managesieve_rulefill', $content, $id, $rid); |
| | | } |
| | | else if ($action == 'actionadd') { |
| | | $aid = rcube_utils::get_input_value('_aid', rcube_utils::INPUT_GPC); |
| | | $aid = rcube_utils::get_input_value('_aid', rcube_utils::INPUT_POST); |
| | | $id = $this->genid(); |
| | | $content = $this->action_div($fid, $id, false); |
| | | |
| | |
| | | $out .= '</div>'; |
| | | |
| | | // mailbox select |
| | | if ($action['type'] == 'fileinto') |
| | | if ($action['type'] == 'fileinto') { |
| | | $mailbox = $this->mod_mailbox($action['target'], 'out'); |
| | | else |
| | | // make sure non-existing (or unsubscribed) mailbox is listed (#1489956) |
| | | $additional = array($mailbox); |
| | | } |
| | | else { |
| | | $mailbox = ''; |
| | | } |
| | | |
| | | $select = $this->rc->folder_selector(array( |
| | | 'realnames' => false, |
| | | 'maxlength' => 100, |
| | | 'id' => 'action_mailbox' . $id, |
| | | 'name' => "_action_mailbox[$id]", |
| | | 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none') |
| | | 'realnames' => false, |
| | | 'maxlength' => 100, |
| | | 'id' => 'action_mailbox' . $id, |
| | | 'name' => "_action_mailbox[$id]", |
| | | 'style' => 'display:'.(empty($action['type']) || $action['type'] == 'fileinto' ? 'inline' : 'none'), |
| | | 'additional' => $additional, |
| | | )); |
| | | $out .= $select->show($mailbox); |
| | | $out .= '</td>'; |