Skip to content

Commit dc98d05

Browse files
committed
check server_id set in tform, not $conf
1 parent f7a8707 commit dc98d05

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

interface/lib/classes/validate_mail_transport.inc.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ function get_error($errmsg) {
4545
function validate_domain($field_name, $field_value, $validator) {
4646
global $app, $conf;
4747

48-
if(empty($field_value) || $field_name != 'domain') return;
49-
5048
if(isset($app->remoting_lib->primary_id)) {
5149
$id = $app->remoting_lib->primary_id;
5250
} else {
@@ -55,7 +53,7 @@ function validate_domain($field_name, $field_value, $validator) {
5553

5654
// mail_transport.domain (could also be an email address) must be unique per server
5755
$sql = "SELECT transport_id, domain FROM mail_transport WHERE domain = ? AND server_id = ? AND transport_id != ?";
58-
$domain_check = $app->db->queryOneRecord($sql, $field_value, $conf['server_id'], $id);
56+
$domain_check = $app->db->queryOneRecord($sql, $field_value, $app->tform_actions->dataRecord['server_id'], $id);
5957

6058
if($domain_check) return $this->get_error('domain_error_unique');
6159
}

0 commit comments

Comments
 (0)