diff --git a/core/domain_settings/domain_edit.php b/core/domain_settings/domain_edit.php index 4aa314e516..a31abb390b 100644 --- a/core/domain_settings/domain_edit.php +++ b/core/domain_settings/domain_edit.php @@ -51,11 +51,8 @@ else { //get http post variables and set them to php variables if (count($_POST) > 0) { $domain_name = check_str($_POST["domain_name"]); - $domain_parent_uuid = check_str($_POST["domain_parent_uuid"]); $domain_enabled = check_str($_POST["domain_enabled"]); $domain_description = check_str($_POST["domain_description"]); - - $domain_parent_uuid = ($domain_parent_uuid == '') ? 'null' : "'".$domain_parent_uuid."'"; // fix null } if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { @@ -95,7 +92,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "("; $sql .= "domain_uuid, "; $sql .= "domain_name, "; - $sql .= "domain_parent_uuid, "; $sql .= "domain_enabled, "; $sql .= "domain_description "; $sql .= ")"; @@ -103,7 +99,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $sql .= "("; $sql .= "'".uuid()."', "; $sql .= "'".$domain_name."', "; - $sql .= $domain_parent_uuid.", "; $sql .= "'".$domain_enabled."', "; $sql .= "'".$domain_description."' "; $sql .= ")"; @@ -129,7 +124,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { // update domain name, description $sql = "update v_domains set "; $sql .= "domain_name = '".$domain_name."', "; - $sql .= "domain_parent_uuid = ".$domain_parent_uuid.", "; $sql .= "domain_enabled = '".$domain_enabled."', "; $sql .= "domain_description = '".$domain_description."' "; $sql .= "where domain_uuid = '".$domain_uuid."' "; @@ -597,7 +591,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { $result = $prep_statement->fetchAll(PDO::FETCH_NAMED); foreach ($result as &$row) { $domain_name = strtolower($row["domain_name"]); - $domain_parent_uuid = $row["domain_parent_uuid"]; $domain_enabled = $row["domain_enabled"]; $domain_description = $row["domain_description"]; } @@ -656,43 +649,6 @@ if (count($_POST) > 0 && strlen($_POST["persistformvar"]) == 0) { echo "\n"; echo "\n"; - echo "\n"; - echo "\n"; - echo " ".$text['label-parent_domain']."\n"; - echo "\n"; - echo "\n"; - echo " \n"; - echo "
\n"; - echo $text['description-parent_domain']."\n"; - echo "\n"; - echo "\n"; - echo "\n"; echo "\n"; echo " ".$text['label-enabled']."\n"; diff --git a/core/domain_settings/domains.php b/core/domain_settings/domains.php index c298473510..7ddf64c420 100644 --- a/core/domain_settings/domains.php +++ b/core/domain_settings/domains.php @@ -190,53 +190,38 @@ else { echo "\n"; if (count($domains) > 0) { - - function get_child_domains($domain_parent_uuid) { - global $domains, $indent; - global $c, $row_style, $text, $v_link_label_edit, $v_link_label_delete; - foreach ($domains as $domain_uuid => $domain) { - if ($domain['parent_uuid'] == $domain_parent_uuid) { - - $tr_link = (permission_exists('domain_edit')) ? "href='domain_edit.php?id=".$domain_uuid."'" : null; - echo "\n"; - echo " "; - echo " ".$domain['name'].""; - if ($domain['enabled'] != '' && $domain['enabled'] != 'true') { - echo "   (".$text['label-disabled'].")"; - } - echo " \n"; - echo " "; - if (permission_exists('domain_edit')) { - echo "".$text['label-manage'].""; - } - echo " "; - echo " ".$domain['description']." \n"; - echo " "; - if (permission_exists('domain_edit')) { - echo "".$v_link_label_edit.""; - } - if (permission_exists('domain_delete')) { - if ($_SESSION["groups"][0]["domain_uuid"] != $domain_uuid && count($domains) > 1) { - echo "".$v_link_label_delete.""; - } - else { - echo "".$v_link_label_delete.""; - } - } - echo " \n"; - echo "\n"; - $c = ($c == 0) ? 1 : 0; - - $indent++; - get_child_domains($domain_uuid); - $indent--; + global $c, $row_style, $text, $v_link_label_edit, $v_link_label_delete; + foreach ($domains as $domain_uuid => $domain) { + $tr_link = (permission_exists('domain_edit')) ? "href='domain_edit.php?id=".$domain_uuid."'" : null; + echo "\n"; + echo " "; + echo " ".$domain['name'].""; + if ($domain['enabled'] != '' && $domain['enabled'] != 'true') { + echo "   (".$text['label-disabled'].")"; + } + echo " \n"; + echo " "; + if (permission_exists('domain_edit')) { + echo "".$text['label-manage'].""; + } + echo " "; + echo " ".$domain['description']." \n"; + echo " "; + if (permission_exists('domain_edit')) { + echo "".$v_link_label_edit.""; + } + if (permission_exists('domain_delete')) { + if ($_SESSION["groups"][0]["domain_uuid"] != $domain_uuid && count($domains) > 1) { + echo "".$v_link_label_delete.""; + } + else { + echo "".$v_link_label_delete.""; } } + echo " \n"; + echo "\n"; + $c = ($c == 0) ? 1 : 0; } - - $indent = 0; - get_child_domains(); - } //end if results echo "\n";