Tweaks get_problems
This commit is contained in:
parent
1f6766f7db
commit
71f3a60e8c
|
@ -2170,15 +2170,24 @@ order by
|
||||||
// by subdomain
|
// by subdomain
|
||||||
$tmp = array();
|
$tmp = array();
|
||||||
foreach ($da['sub'] as $sub) {
|
foreach ($da['sub'] as $sub) {
|
||||||
if ($sub['web_action']!='OK') continue;
|
// Skip when disable or deleted
|
||||||
if (!$sub['only_dns']) {
|
if ($sub['enable']=='DISABLE') continue;
|
||||||
if (!isset($tmp[$sub['fqdn']])) {
|
if ($sub['enable']=='DISABLED') continue;
|
||||||
$tmp[$sub['fqdn']] = 0;
|
if ($sub['web_action']=='DELETE') continue;
|
||||||
}
|
|
||||||
$tmp[$sub['fqdn']]++;
|
// Skip if "only_dns" and no conf generated
|
||||||
if ($tmp[$sub['fqdn']] >= 2) {
|
if ($sub['only_dns']) continue;
|
||||||
$errors[$sub['fqdn']] = sprintf(_("Problem on %s: there is more than 1 web configuration going to be generated for this sub-domain."), $sub['fqdn']);
|
|
||||||
}
|
// Init the value in the tmp array
|
||||||
|
if (!isset($tmp[$sub['fqdn']])) {
|
||||||
|
$tmp[$sub['fqdn']] = 0;
|
||||||
|
}
|
||||||
|
// Increment value
|
||||||
|
$tmp[$sub['fqdn']]++;
|
||||||
|
|
||||||
|
// If there is more than 1 configuration file for this FQDN, alert !
|
||||||
|
if ($tmp[$sub['fqdn']] >= 2) {
|
||||||
|
$errors[$sub['fqdn']] = sprintf(_("Problem on %s: there is more than 1 web configuration going to be generated for this sub-domain."), $sub['fqdn']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue