Commit d58ae286 authored by Florian Schaal's avatar Florian Schaal

Merge branch 'stable-3.1' of git.ispconfig.org:ispconfig/ispconfig3 into stable-3.1

parents 9584fb94 db6af21d
......@@ -208,9 +208,9 @@ class remoting_mail extends remoting {
//* Check if mail domain exists
$email_parts = explode('@', $params['email']);
$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ?", $email_parts[1]);
$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ? AND domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain')", $email_parts[1]);
if($tmp['domain'] != $email_parts[1]) {
throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist.');
throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist as primary.');
return false;
}
......@@ -234,11 +234,11 @@ class remoting_mail extends remoting {
return false;
}
//* Check if mail domain exists
//* Check if mail domain exists, and is not used as aliasdomain
$email_parts = explode('@', $params['email']);
$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ?", $email_parts[1]);
$tmp = $app->db->queryOneRecord("SELECT domain FROM mail_domain WHERE domain = ? AND domain NOT IN (SELECT SUBSTR(source,2) FROM mail_forwarding WHERE type = 'aliasdomain')", $email_parts[1]);
if($tmp['domain'] != $email_parts[1]) {
throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist.');
throw new SoapFault('mail_domain_does_not_exist', 'Mail domain - '.$email_parts[1].' - does not exist as primary.');
return false;
}
......
......@@ -49,8 +49,8 @@ $app->load_language_file('web/sites/'.$lngfile);
// we will check only users, not admins
if($_SESSION["s"]["user"]["typ"] == 'user') {
$app->tform->formDef['db_table_idx'] = 'client_id';
$app->tform->formDef['db_table'] = 'client';
$app->tform->formDef['db_table_idx'] = 'id';
$app->tform->formDef['db_table'] = 'aps_instances';
if(!$app->tform->checkClientLimit('limit_aps')) {
$app->error($app->lng("limit_aps_txt"));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment