From 74454396542879f50f749e64f0ee6deb6f3ddecb Mon Sep 17 00:00:00 2001 From: Benjamin Sonntag Date: Tue, 17 Jul 2018 15:50:29 +0200 Subject: [PATCH] [enh] proper name for autodiscover + fix global in m_dom --- bureau/class/m_dom.php | 4 ++-- install/mysql.sql | 2 +- install/upgrades/3.5.0.1.sql | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bureau/class/m_dom.php b/bureau/class/m_dom.php index 5354218b..77b8bf64 100644 --- a/bureau/class/m_dom.php +++ b/bureau/class/m_dom.php @@ -54,7 +54,7 @@ class m_dom { * du domaine par update_domains.sh * @access private */ - var $fic_lock_cron = "/run/alternc/cron.lock"; + const fic_lock_cron = "/run/alternc/cron.lock"; var $type_local = "VHOST"; var $type_url = "URL"; @@ -1784,7 +1784,7 @@ class m_dom { function unlock($isshutdown=0) { global $msg,$domislocked; $msg->debug("dom", "unlock"); - if (!$isshutdown && !m_dom::islocked) { + if (!$isshutdown && !$domislocked) { $msg->raise("ERROR", "dom", _("--- Program error --- No lock on the domains!")); } // don't use $this since we may be called by register_shutdown_function out of an object instance. diff --git a/install/mysql.sql b/install/mysql.sql index 4fd129f0..26373fd3 100644 --- a/install/mysql.sql +++ b/install/mysql.sql @@ -481,7 +481,7 @@ CREATE TABLE IF NOT EXISTS `domaines_type` ( INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced, enable) VALUES ('dkim', 'DKIM Key', 'NONE', '%SUB% IN TXT "%TARGET%"', 'txt,defmx,defmx2,mx,mx2,url,ip,ipv6', true, true, true, 'ADMIN'), -('autodiscover', 'Autodiscover and autoconf for email', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', false, true, true, 'ADMIN'), +('autodiscover', 'Email autoconfiguration', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', false, true, true, 'ADMIN'), ('vhost', 'Locally hosted', 'DIRECTORY', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', false, false, false, 'ALL'), ('url', 'URL redirection', 'URL', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2', false, false, false, 'ALL'), ('ip', 'IPv4 redirect', 'IP', '%SUB% IN A %TARGET%', 'url,ip,ipv6,txt,mx,mx2,defmx,defmx2', true, true, false, 'ALL'), diff --git a/install/upgrades/3.5.0.1.sql b/install/upgrades/3.5.0.1.sql index 0cb4a949..2c31a493 100644 --- a/install/upgrades/3.5.0.1.sql +++ b/install/upgrades/3.5.0.1.sql @@ -4,7 +4,7 @@ INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibil ('dkim', 'DKIM Key', 'NONE', '%SUB% IN TXT "%TARGET%"', 'txt,defmx,defmx2,mx,mx2,url,ip,ipv6', true, true, true, 'ADMIN'); -- migrating AUTODISCOVER / AUTOCONF to be inside sub_domaines table INSERT IGNORE INTO `domaines_type` (name, description, target, entry, compatibility, only_dns, need_dns, advanced, enable) VALUES -('autodiscover', 'Autodiscover and autoconf for email', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', false, true, true, 'ADMIN'); +('autodiscover', 'Email autoconfiguration', 'NONE', '%SUB% IN A @@PUBLIC_IP@@', 'txt,defmx,defmx2,mx,mx2', false, true, true, 'ADMIN'); -- upgrade from 3.4.10 and 3.4.11 (a bug prevented them to be inserted :/ )