diff --git a/bureau/admin/dom_edit.php b/bureau/admin/dom_edit.php index cec2077c..88d4c629 100755 --- a/bureau/admin/dom_edit.php +++ b/bureau/admin/dom_edit.php @@ -41,6 +41,9 @@ if (!$r=$dom->get_domain_all($domain)) { } $dom->unlock(); +if (isset($_GET["msg"])) { + $msg->raise("INFO","dom",$_GET["msg"]); +} ?>

array ("request", "string", (empty($domain)?"":$domain) ), @@ -34,6 +33,7 @@ getFields($fields); $dom->lock(); if (!$r=$dom->get_domain_all($domain)) { $dom->unlock(); + require_once("head.php"); echo $msg->msg_html_all(); include('foot.php'); die(); @@ -54,13 +54,15 @@ if (count($_POST)) { } $dom->unlock(); if ($haserror) { + require_once("head.php"); echo $msg->msg_html_all(); } else { - header("Location: dom_edit.php?domain=".eue($domain,false)); + header("Location: dom_edit.php?domain=".eue($domain,false)."&msg=".eue(_("Your HTTPS preferences have been set"),false)); + exit(); } } // post ? - +require_once("head.php"); ?>

@@ -72,7 +74,7 @@ if (count($_POST)) {

-
+ @@ -94,9 +96,11 @@ for($i=0;$i<$r["nsub"];$i++) { echo ""; $providers=array(); foreach($certs as $cert) { - if ($cert["provider"] && !isset($providers[$cert["provider"]])) { + if ($cert["provider"] && $cert["provider"]!="snakeoil" && !isset($providers[$cert["provider"]])) { $providers[$cert["provider"]]=1; - echo ""; + echo ""; } } echo ""; diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index e7901e3c..49daf8a2 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -1203,16 +1203,10 @@ class m_dom { $r["sub"] = array(); $data = $db->fetchAll(); foreach($data as $i=>$record) { - $r["sub"][$i] = array(); - $r["sub"][$i]["id"] = $record["id"]; + $r["sub"][$i] = $record; + // FIXME : replace sub by name and dest by valeur in the code that exploits this function : $r["sub"][$i]["name"] = $record["sub"]; $r["sub"][$i]["dest"] = $record["valeur"]; - $r["sub"][$i]["type"] = $record["type"]; - $r["sub"][$i]["enable"] = $record["enable"]; - $r["sub"][$i]["type_desc"] = $record["type_desc"]; - $r["sub"][$i]["only_dns"] = $record["only_dns"]; - $r["sub"][$i]["web_action"] = $record["web_action"]; - $r["sub"][$i]["advanced"] = $record["advanced"]; $r["sub"][$i]["fqdn"] = ((!empty($r["sub"][$i]["name"])) ? $r["sub"][$i]["name"] . "." : "") . $r["name"]; } $db->free(); @@ -1395,9 +1389,9 @@ class m_dom { * @param string the provider (if not empty, will be checked against an existing certificate for this subdomain) * @return boolean true if the preference has been set */ - function set_sub_domain_ssl_provider($sub_domain_id,$provider) { + function set_subdomain_ssl_provider($sub_domain_id,$provider) { global $db, $msg, $cuid, $ssl; - $msg->log("dom", "set_sub_domain_ssl_provider", $sub_domain_id." / ".$provider) + $msg->log("dom", "set_sub_domain_ssl_provider", $sub_domain_id." / ".$provider); // Locked ? if (!$this->islocked) { $msg->raise("ERROR", "dom", _("--- Program error --- No lock on the domains!"));