diff --git a/ispconfig3_spam/ispconfig3_spam.php b/ispconfig3_spam/ispconfig3_spam.php index 1fcd8ea..0982062 100644 --- a/ispconfig3_spam/ispconfig3_spam.php +++ b/ispconfig3_spam/ispconfig3_spam.php @@ -122,6 +122,8 @@ function save() } $params['move_junk'] = $move_junk; + $params['purge_junk_days'] = rcube_utils::get_input_value('_purge_junk_days', rcube_utils::INPUT_POST); + $params['purge_trash_days'] = rcube_utils::get_input_value('_purge_trash_days', rcube_utils::INPUT_POST); $this->soap->mail_user_update($session_id, $uid, $mail_user[0]['mailuser_id'], $params); $this->soap->logout($session_id); @@ -175,6 +177,9 @@ function gen_form($attrib) $enabled = $mail_user[0]['move_junk']; if ($enabled == 'y') { $enabled = 1; + + $purge_junk_days = $mail_user[0]['purge_junk_days']; + $purge_trash_days = $mail_user[0]['purge_trash_days']; } } catch (SoapFault $e) { @@ -194,8 +199,18 @@ function gen_form($attrib) $input_spammove = new html_checkbox(['name' => '_' . $field_id, 'id' => $field_id, 'value' => '1']); $table->add('title', html::label($field_id, rcube::Q($this->gettext('spammove')))); $table->add('', $input_spammove->show($enabled)); - $out .= $table->show(); + $field_id = 'purge_junk_days'; + $input_purge_junk_days = new html_inputfield(array('name' => '_' . $field_id, 'id' => $field_id, 'size' => '10')); + $table->add('title', html::label($field_id, rcube::Q($this->gettext('purge_junk_days')))); + $table->add('', $input_purge_junk_days->show($purge_junk_days)); + + $field_id = 'purge_trash_days'; + $input_purge_trash_days = new html_inputfield(array('name' => '_' . $field_id, 'id' => $field_id, 'size' => '10')); + $table->add('title', html::label($field_id, rcube::Q($this->gettext('purge_trash_days')))); + $table->add('', $input_purge_trash_days->show($purge_trash_days)); + + $out .= $table->show(); $out .= "\n"; return $out; diff --git a/ispconfig3_spam/localization/en_US.inc b/ispconfig3_spam/localization/en_US.inc index eb15e3e..821340d 100644 --- a/ispconfig3_spam/localization/en_US.inc +++ b/ispconfig3_spam/localization/en_US.inc @@ -7,4 +7,6 @@ $labels['policy_greylisting'] = 'Greylisting level'; $labels['policy_tag'] = 'Tag level'; $labels['policy_tag2'] = 'Tag2 level'; $labels['policy_kill'] = 'Kill level'; -$labels['spamnopolicies'] = 'No policies available'; \ No newline at end of file +$labels['spamnopolicies'] = 'No policies available'; +$labels['purge_junk_days'] = 'Purge Junk automatically after X days'; +$labels['purge_trash_days'] = 'Purge Trash automatically after X days'; diff --git a/ispconfig3_spam/localization/nl_NL.inc b/ispconfig3_spam/localization/nl_NL.inc index 83be47e..7c0f0e8 100644 --- a/ispconfig3_spam/localization/nl_NL.inc +++ b/ispconfig3_spam/localization/nl_NL.inc @@ -7,4 +7,6 @@ $labels['policy_greylisting'] = 'Greylisting level'; $labels['policy_tag'] = 'Tag level'; $labels['policy_tag2'] = 'Tag2 level'; $labels['policy_kill'] = 'Kill level'; -$labels['spamnopolicies'] = 'Geen policies beschikbaar'; \ No newline at end of file +$labels['spamnopolicies'] = 'Geen policies beschikbaar'; +$labels['purge_junk_days'] = 'Verwijder uit de Junk map automatisch na X dagen'; +$labels['purge_trash_days'] = 'Verwijder uit de Prullenbak automatisch na X dagen';