From 4403ba772752b6b82ca914c6a4e8c02151db994c Mon Sep 17 00:00:00 2001 From: Roland Gruber Date: Mon, 25 Feb 2013 19:29:21 +0000 Subject: [PATCH] make DDNS key optional --- lam/lib/modules/ddns.inc | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/lam/lib/modules/ddns.inc b/lam/lib/modules/ddns.inc index 406d56b6..148de267 100644 --- a/lam/lib/modules/ddns.inc +++ b/lam/lib/modules/ddns.inc @@ -160,10 +160,6 @@ class ddns extends baseModule { if (!in_array_ignore_case('dhcpService', $this->attributes['objectClass']) && !in_array_ignore_case('dhcpServer', $this->attributes['objectClass'])) { return false; } - //Main settings - if ($this->isDynDNSActivated() && (($this->getUpdateKey() == null) || ($this->getUpdateKey() == ''))) { - return false; - } } else { if (!$this->check_if_ddns_is_enable()) { @@ -278,11 +274,7 @@ class ddns extends baseModule { $this->setIgnoreClientUpdates(($client_insert == 'on')); $this->setUpdateKey($key_path); - // key path must be insert, when ddns is active - if ($active == 'on' && empty($key_path)) { - $errors[] = $this->messages['key_path'][0]; - } - elseif (!empty($key_path)) { + if (!empty($key_path)) { if (str_replace("\"","",$_POST['key_path']) != $key_path) { $errors[] = $this->messages['key_path'][1]; } @@ -370,7 +362,6 @@ class ddns extends baseModule { $return->addElement(new htmlTableExtendedInputCheckbox('insert_fixed', $this->addFixIPs(), _('Add fix IP addresses to DNS'), 'fixed_ips'), true); $return->addElement(new htmlTableExtendedInputCheckbox('client_insert', $this->isIgnoreClientUpdates(), _('Disable client updates'), 'client_insert'), true); $keyInput = new htmlTableExtendedInputField(_('Path to key for DNS updates'), 'key_path', $this->getUpdateKey(), 'keypath'); - $keyInput->setRequired(true); $return->addElement($keyInput); } else {