more integration of domain deactivated flag
Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
@@ -137,6 +137,7 @@ if ($page == 'overview' || $page == 'domains') {
|
|||||||
AND `parentdomainid` = '0'
|
AND `parentdomainid` = '0'
|
||||||
AND `email_only` = '0'
|
AND `email_only` = '0'
|
||||||
AND `caneditdomain` = '1'
|
AND `caneditdomain` = '1'
|
||||||
|
AND `deactivated` = '0'
|
||||||
ORDER BY `domain` ASC");
|
ORDER BY `domain` ASC");
|
||||||
Database::pexecute($stmt, [
|
Database::pexecute($stmt, [
|
||||||
"customerid" => $userinfo['customerid']
|
"customerid" => $userinfo['customerid']
|
||||||
|
|||||||
@@ -88,9 +88,12 @@ class Emails extends ApiCommand implements ResourceEntity
|
|||||||
$domain_check = $this->apiCall('SubDomains.get', [
|
$domain_check = $this->apiCall('SubDomains.get', [
|
||||||
'domainname' => $domain
|
'domainname' => $domain
|
||||||
], true);
|
], true);
|
||||||
if ($domain_check['isemaildomain'] == 0) {
|
if ((int)$domain_check['isemaildomain'] == 0) {
|
||||||
Response::standardError('maindomainnonexist', $domain, true);
|
Response::standardError('maindomainnonexist', $domain, true);
|
||||||
}
|
}
|
||||||
|
if ((int)$domain_check['deactivated'] == 1) {
|
||||||
|
Response::standardError('maindomaindeactivated', $domain, true);
|
||||||
|
}
|
||||||
|
|
||||||
if (Settings::Get('catchall.catchall_enabled') != '1') {
|
if (Settings::Get('catchall.catchall_enabled') != '1') {
|
||||||
$iscatchall = 0;
|
$iscatchall = 0;
|
||||||
|
|||||||
@@ -229,6 +229,9 @@ class SubDomains extends ApiCommand implements ResourceEntity
|
|||||||
} elseif ($completedomain_check && strtolower($completedomain_check['domain']) == strtolower($completedomain)) {
|
} elseif ($completedomain_check && strtolower($completedomain_check['domain']) == strtolower($completedomain)) {
|
||||||
// the domain does already exist as main-domain
|
// the domain does already exist as main-domain
|
||||||
Response::standardError('domainexistalready', $completedomain, true);
|
Response::standardError('domainexistalready', $completedomain, true);
|
||||||
|
} elseif ((int)$domain_check['deactivated'] == 1) {
|
||||||
|
// main domain is deactivated
|
||||||
|
Response::standardError('maindomaindeactivated', $domain, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if allowed, check for 'is email domain'-flag
|
// if allowed, check for 'is email domain'-flag
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class CurrentUser
|
|||||||
$result_stmt = Database::prepare("
|
$result_stmt = Database::prepare("
|
||||||
SELECT COUNT(`id`) as emaildomains
|
SELECT COUNT(`id`) as emaildomains
|
||||||
FROM `" . TABLE_PANEL_DOMAINS . "`
|
FROM `" . TABLE_PANEL_DOMAINS . "`
|
||||||
WHERE `customerid`= :cid AND `isemaildomain` = '1'
|
WHERE `customerid`= :cid AND `isemaildomain` = '1' AND `deactivated` = '0'
|
||||||
");
|
");
|
||||||
$result = Database::pexecute_first($result_stmt, [
|
$result = Database::pexecute_first($result_stmt, [
|
||||||
"cid" => $_SESSION['userinfo']['customerid']
|
"cid" => $_SESSION['userinfo']['customerid']
|
||||||
@@ -156,6 +156,7 @@ class CurrentUser
|
|||||||
$_SESSION['userinfo'],
|
$_SESSION['userinfo'],
|
||||||
['sql_search' => [
|
['sql_search' => [
|
||||||
'd.parentdomainid' => 0,
|
'd.parentdomainid' => 0,
|
||||||
|
'd.deactivated' => 0,
|
||||||
'd.id' => ['op' => '<>', 'value' => $_SESSION['userinfo']['standardsubdomain']]
|
'd.id' => ['op' => '<>', 'value' => $_SESSION['userinfo']['standardsubdomain']]
|
||||||
]
|
]
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -699,7 +699,7 @@ return [
|
|||||||
'openbasedirenabled' => 'Openbasedir Einschränkung',
|
'openbasedirenabled' => 'Openbasedir Einschränkung',
|
||||||
'hsts' => 'HSTS aktiviert',
|
'hsts' => 'HSTS aktiviert',
|
||||||
'aliasdomainid' => 'ID der Alias-Domain',
|
'aliasdomainid' => 'ID der Alias-Domain',
|
||||||
'nodomainsassignedbyadmin' => 'Diesem Account wurde noch keine Domain zugewiesen. Bitte kontaktiere deinen Administrator, wenn du der Meinung bist, das ist nicht korrekt.',
|
'nodomainsassignedbyadmin' => 'Diesem Account wurde noch keine (aktive) Domain zugewiesen. Bitte kontaktiere deinen Administrator, wenn du der Meinung bist, das ist nicht korrekt.',
|
||||||
],
|
],
|
||||||
'emails' => [
|
'emails' => [
|
||||||
'description' => 'Hier können Sie Ihre E-Mail-Adressen einrichten.<br />Ein Konto ist wie Ihr Briefkasten vor der Haustür. Wenn jemand eine E-Mail an Sie schreibt, wird diese in dieses Konto gelegt.<br /><br />Die Zugangsdaten lauten wie folgt: (Die Angaben in <i>kursiver</i> Schrift sind durch die jeweiligen Einträge zu ersetzen)<br /><br />Hostname: <b><i>Domainname</i></b><br />Benutzername: <b><i>Kontoname / E-Mail-Adresse</i></b><br />Passwort: <b><i>das gewählte Passwort</i></b>',
|
'description' => 'Hier können Sie Ihre E-Mail-Adressen einrichten.<br />Ein Konto ist wie Ihr Briefkasten vor der Haustür. Wenn jemand eine E-Mail an Sie schreibt, wird diese in dieses Konto gelegt.<br /><br />Die Zugangsdaten lauten wie folgt: (Die Angaben in <i>kursiver</i> Schrift sind durch die jeweiligen Einträge zu ersetzen)<br /><br />Hostname: <b><i>Domainname</i></b><br />Benutzername: <b><i>Kontoname / E-Mail-Adresse</i></b><br />Passwort: <b><i>das gewählte Passwort</i></b>',
|
||||||
@@ -770,6 +770,7 @@ return [
|
|||||||
'domainisaliasorothercustomer' => 'Die ausgewählte Aliasdomain ist entweder selbst eine Aliasdomain, hat nicht die gleiche IP/Port-Kombination oder gehört einem anderen Kunden.',
|
'domainisaliasorothercustomer' => 'Die ausgewählte Aliasdomain ist entweder selbst eine Aliasdomain, hat nicht die gleiche IP/Port-Kombination oder gehört einem anderen Kunden.',
|
||||||
'emailexistalready' => 'Die E-Mail-Adresse "%s" existiert bereits.',
|
'emailexistalready' => 'Die E-Mail-Adresse "%s" existiert bereits.',
|
||||||
'maindomainnonexist' => 'Die Hauptdomain "%s" existiert nicht.',
|
'maindomainnonexist' => 'Die Hauptdomain "%s" existiert nicht.',
|
||||||
|
'maindomaindeactivated' => 'Die Hauptdomain "%s" ist deaktiviert.',
|
||||||
'destinationnonexist' => 'Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein.',
|
'destinationnonexist' => 'Bitte geben Sie Ihre Weiterleitungsadresse im Feld \'Nach\' ein.',
|
||||||
'destinationalreadyexistasmail' => 'Die Weiterleitung zu "%s" existiert bereits als aktive E-Mail-Adresse.',
|
'destinationalreadyexistasmail' => 'Die Weiterleitung zu "%s" existiert bereits als aktive E-Mail-Adresse.',
|
||||||
'destinationalreadyexist' => 'Es existiert bereits eine Weiterleitung nach "%s".',
|
'destinationalreadyexist' => 'Es existiert bereits eine Weiterleitung nach "%s".',
|
||||||
|
|||||||
@@ -765,7 +765,7 @@ return [
|
|||||||
'openbasedirenabled' => 'Openbasedir restiction',
|
'openbasedirenabled' => 'Openbasedir restiction',
|
||||||
'hsts' => 'HSTS enabled',
|
'hsts' => 'HSTS enabled',
|
||||||
'aliasdomainid' => 'ID of alias domain',
|
'aliasdomainid' => 'ID of alias domain',
|
||||||
'nodomainsassignedbyadmin' => 'Your account has currently no domains assigned to it. Please contact your administrator if you think this is wrong.',
|
'nodomainsassignedbyadmin' => 'Your account has currently no (active) domains assigned to it. Please contact your administrator if you think this is wrong.',
|
||||||
],
|
],
|
||||||
'emails' => [
|
'emails' => [
|
||||||
'description' => 'Here you can create and change your email addresses.<br />An account is like your letterbox in front of your house. If someone sends you an email, it will be dropped into the account.<br /><br />To download your emails use the following settings in your mailprogram: (The data in <i>italics</i> has to be changed to the equivalents you typed in!)<br />Hostname: <b><i>domainname</i></b><br />Username: <b><i>account name / e-mail address</i></b><br />password: <b><i>the password you\'ve chosen</i></b>',
|
'description' => 'Here you can create and change your email addresses.<br />An account is like your letterbox in front of your house. If someone sends you an email, it will be dropped into the account.<br /><br />To download your emails use the following settings in your mailprogram: (The data in <i>italics</i> has to be changed to the equivalents you typed in!)<br />Hostname: <b><i>domainname</i></b><br />Username: <b><i>account name / e-mail address</i></b><br />password: <b><i>the password you\'ve chosen</i></b>',
|
||||||
@@ -836,6 +836,7 @@ return [
|
|||||||
'domainisaliasorothercustomer' => 'The selected alias domain is either itself an alias domain, has a different ip/port combination or belongs to another customer.',
|
'domainisaliasorothercustomer' => 'The selected alias domain is either itself an alias domain, has a different ip/port combination or belongs to another customer.',
|
||||||
'emailexistalready' => 'The email-address %s already exists.',
|
'emailexistalready' => 'The email-address %s already exists.',
|
||||||
'maindomainnonexist' => 'The main-domain %s does not exist.',
|
'maindomainnonexist' => 'The main-domain %s does not exist.',
|
||||||
|
'maindomaindeactivated' => 'The main-domain %s is deactivated.',
|
||||||
'destinationnonexist' => 'Please create your forwarder in the field \'Destination\'.',
|
'destinationnonexist' => 'Please create your forwarder in the field \'Destination\'.',
|
||||||
'destinationalreadyexistasmail' => 'The forwarder to %s already exists as active email-address.',
|
'destinationalreadyexistasmail' => 'The forwarder to %s already exists as active email-address.',
|
||||||
'destinationalreadyexist' => 'You have already defined a forwarder to "%s"',
|
'destinationalreadyexist' => 'You have already defined a forwarder to "%s"',
|
||||||
|
|||||||
Reference in New Issue
Block a user