Edition de sous-domaines
This commit is contained in:
parent
cee931e448
commit
b9d8daab9b
|
@ -40,6 +40,7 @@ $dom->unlock();
|
|||
<?php foreach($dom->domains_type_lst() as $dt) {
|
||||
if (! $dt['enable']) continue;
|
||||
if ( (! $r['dns'] ) and ($dt['need_dns']) ) continue;
|
||||
//if ( strtoupper($type)!=strtoupper($dt['name']) ) continue;
|
||||
$targval=(strtoupper($type)==strtoupper($dt['name']))?$sd['dest']:'';
|
||||
?>
|
||||
<tr>
|
||||
|
|
|
@ -792,7 +792,7 @@ class m_dom {
|
|||
$compatibility_lst = explode(",",$db->f('compatibility'));
|
||||
|
||||
# Get the list of type of subdomains already here who have the same name
|
||||
$db->query("select * from sub_domaines where sub='$sub' and domaine='$dom' and not (type='$type' and valeur='$value_old')");
|
||||
$db->query("select * from sub_domaines where sub='$sub' and domaine='$dom' and not (type='$type' and valeur='$value_old') and web_action != 'DELETE'");
|
||||
#$db->query("select * from sub_domaines where sub='$sub' and domaine='$dom';");
|
||||
while ($db->next_record()) {
|
||||
# And if there is a domain with a incompatible type, return false
|
||||
|
@ -860,7 +860,7 @@ class m_dom {
|
|||
}
|
||||
|
||||
if (! is_null($type_old )) { // It's not a creation, it's an edit. Delete the old one
|
||||
$db->query("delete from sub_domaines where domaine='$dom' and sub='$sub' and upper(type)=upper('$type_old') and valeur='$value_old';");
|
||||
$db->query("update sub_domaines set web_action='DELETE' where domaine='$dom' and sub='$sub' and upper(type)=upper('$type_old') and valeur='$value_old';");
|
||||
}
|
||||
|
||||
// Re-create the one we want
|
||||
|
|
|
@ -35,7 +35,7 @@ INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibil
|
|||
alter table domaines add column dns_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE';
|
||||
alter table domaines add column dns_result varchar(255) not null default '';
|
||||
alter table sub_domaines add column web_action enum ('OK','UPDATE','DELETE') NOT NULL default 'UPDATE';
|
||||
alter table sub_domaines add column dns_result varchar(255) not null default '';
|
||||
alter table sub_domaines add column web_result varchar(255) not null default '';
|
||||
alter table sub_domaines add column enable enum ('ENABLED', 'ENABLE', 'DISABLED', 'DISABLE') NOT NULL DEFAULT 'ENABLED';
|
||||
drop table sub_domaines_standby;
|
||||
drop table domaines_standby;
|
||||
|
|
Loading…
Reference in New Issue