From f9d2c783e535ddbcdb3ff125b19a0ce5e734a3d4 Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Sat, 23 Jun 2018 17:11:57 +0200 Subject: [PATCH] [fix] alternc-ssl + dom global missing --- bureau/class/m_ssl.php | 2 +- src/install.d/alternc-ssl | 67 --------------------------------------- 2 files changed, 1 insertion(+), 68 deletions(-) delete mode 100755 src/install.d/alternc-ssl diff --git a/bureau/class/m_ssl.php b/bureau/class/m_ssl.php index 4684a0a4..9b9b782a 100644 --- a/bureau/class/m_ssl.php +++ b/bureau/class/m_ssl.php @@ -552,7 +552,7 @@ SELECT ?,?,?, FROM_UNIXTIME(?), FROM_UNIXTIME(?), ?, ?, sslcsr FROM certificate * (like a generic admin-shared or self-signed for localhost as a last chance) */ public function updateDomain($action, $type, $fqdn, $mail = 0, $value = "") { - global $db, $msg; + global $db, $msg, $dom; $msg->log("ssl", "update_domain($action,$type,$fqdn)"); // the domain type must be a "dns_only=false" one: diff --git a/src/install.d/alternc-ssl b/src/install.d/alternc-ssl deleted file mode 100755 index ba568910..00000000 --- a/src/install.d/alternc-ssl +++ /dev/null @@ -1,67 +0,0 @@ -#!/usr/bin/php -query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('vhost-ssl', 'Locally hosted forcing HTTPS', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 0);"); - - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('vhost-mixssl', 'Locally hosted HTTP and HTTPS', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 1);"); - - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('panel-ssl', 'HTTPS AlternC panel access', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt,mx,mx2,defmx,defmx2', 'ALL', 0, 0, 1);"); - - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('url-ssl', 'URL redirection, HTTP & HTTPS', 'URL', '%SUB% IN A @@PUBLIC_IP@@', 'txt,mx,mx2,defmx,defmx2', 'ALL', 0, 0, 1);"); - - $db->query("SELECT * FROM domaines_type WHERE name='roundcube';"); - if ($db->next_record()) { - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('roundcube-ssl', 'HTTPS Roundcube Webmail', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'mx,mx2,defmx,defmx2,txt', 'ALL', 0, 0, 1);"); - } else { - $db->query("DELETE FROM domaines_type WHERE name='roundcube-ssl';"); - $db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE type='roundcube-ssl';"); - } - - $db->query("SELECT * FROM domaines_type WHERE name='squirrelmail';"); - if ($db->next_record()) { - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('squirrelmail-ssl', 'HTTPS Squirrelmail Webmail', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'mx,mx2,defmx,defmx2,txt', 'ALL', 0, 0, 1);"); - } else { - $db->query("DELETE FROM domaines_type WHERE name='squirrelmail-ssl';"); - $db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE type='squirrelmail-ssl';"); - } - - $db->query("SELECT * FROM domaines_type WHERE name='php52';"); - if ($db->next_record()) { - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('php52-ssl', 'php52 forcing HTTPS', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 0);"); - $db->query("INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, enable, only_dns, need_dns, advanced ) VALUES - ('php52-mixssl', 'php52 HTTP and HTTPS', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'vhost,url,txt,defmx,defmx2,mx,mx2', 'ALL', 0, 0, 0);"); - } else { - $db->query("DELETE FROM domaines_type WHERE name='php52-ssl';"); - $db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE type='php52-ssl';"); - $db->query("DELETE FROM domaines_type WHERE name='php52-mixssl';"); - $db->query("UPDATE sub_domaines SET web_action='DELETE' WHERE type='php52-mixssl';"); - } - -} // before-reload