diff --git a/install/sql/incremental/upd_dev_collection.sql b/install/sql/incremental/upd_dev_collection.sql index efd0f4082b720d85f96d612a105ba8a799694522..659708c685587c79bed747f1e0e99514d7e27449 100644 --- a/install/sql/incremental/upd_dev_collection.sql +++ b/install/sql/incremental/upd_dev_collection.sql @@ -23,3 +23,6 @@ ALTER TABLE `web_domain` ALTER pm SET DEFAULT 'ondemand'; ALTER TABLE `mail_user` ADD `purge_trash_days` INT NOT NULL DEFAULT '0' AFTER `move_junk`, ADD `purge_junk_days` INT NOT NULL DEFAULT '0' AFTER `purge_trash_days`; + +-- doveadm should be enabled for all mailboxes +UPDATE `mail_user` set `disabledoveadm` = 'n'; diff --git a/interface/lib/classes/validate_server_directive_snippets.inc.php b/interface/lib/classes/validate_server_directive_snippets.inc.php index 0272166c40d7fced1cf84b225eaa81a05562fc39..751400766cfd78a0d8d67e7016dc81b04ad7d723 100755 --- a/interface/lib/classes/validate_server_directive_snippets.inc.php +++ b/interface/lib/classes/validate_server_directive_snippets.inc.php @@ -42,7 +42,10 @@ class validate_server_directive_snippets { function validate_snippet($field_name, $field_value, $validator) { global $app; - $check = $app->db->queryAllRecords('SELECT * FROM directive_snippets WHERE name = ? AND type = ?', $field_value, trim($_POST['type'])); + $type=(isset($app->remoting_lib->dataRecord['type']))?$app->remoting_lib->dataRecord['type']:$_POST['type']; + $types = array('apache','nginx','php','proxy'); + if(!in_array($type,$types)) return $this->get_error('directive_snippets_invalid_type'); + $check = $app->db->queryAllRecords('SELECT * FROM directive_snippets WHERE name = ? AND type = ?', $field_value, $type); if(!empty($check)) return $this->get_error('directive_snippets_name_error_unique'); } diff --git a/interface/web/mail/mail_user_edit.php b/interface/web/mail/mail_user_edit.php index d291367d11ce06789a5264c2823e537576ae6479..7255c6dbac1838f5f5db606b06d0ae9f038dee1b 100644 --- a/interface/web/mail/mail_user_edit.php +++ b/interface/web/mail/mail_user_edit.php @@ -313,8 +313,8 @@ class page_action extends tform_actions { $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y'; $disablesmtp = ($this->dataRecord["disablesmtp"])?'y':'n'; - $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disabledoveadm = ? WHERE mailuser_id = ?"; - $app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disableimap, $this->id); + $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ? WHERE mailuser_id = ?"; + $app->db->query($sql, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $this->id); } } @@ -365,8 +365,8 @@ class page_action extends tform_actions { $disabledeliver = ($this->dataRecord["postfix"] == 'y')?'n':'y'; $disablesmtp = (isset($this->dataRecord["disablesmtp"]) && $this->dataRecord["disablesmtp"])?'y':'n'; - $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ?, disabledoveadm = ? WHERE mailuser_id = ?"; - $app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $disableimap, $this->id); + $sql = "UPDATE mail_user SET disableimap = ?, disablesieve = ?, `disablesieve-filter` = ?, disablepop3 = ?, disablesmtp = ?, disabledeliver = ?, disablelda = ? WHERE mailuser_id = ?"; + $app->db->query($sql, $disableimap, $disableimap, $disableimap, $disablepop3, $disablesmtp, $disabledeliver, $disabledeliver, $this->id); } //** If the email address has been changed, change it in all aliases too