add possibility to specify AXFR servers for bind zone-configuration, fixes #100

Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann (d00p)
2013-04-18 16:38:22 +02:00
parent 0001c30a5d
commit e97a7c611c
8 changed files with 68 additions and 25 deletions

View File

@@ -511,6 +511,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('system', 'apache24', '0'),
('system', 'documentroot_use_default_value', '0'),
('system', 'passwordcryptfunc', '1'),
('system', 'axfrservers', ''),
('panel', 'decimal_places', '4'),
('panel', 'adminmail', 'admin@SERVERNAME'),
('panel', 'phpmyadmin_url', ''),
@@ -538,7 +539,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
('panel', 'phpconfigs_hidestdsubdomain', '0'),
('panel', 'allow_theme_change_admin', '1'),
('panel', 'allow_theme_change_customer', '1'),
('panel', 'version', '0.9.29-dev2');
('panel', 'version', '0.9.29-dev3');

View File

@@ -2087,3 +2087,18 @@ if (isFroxlorVersion('0.9.29-dev1')) {
updateToVersion('0.9.29-dev2');
}
if (isFroxlorVersion('0.9.29-dev2')) {
showUpdateStep("Updating from 0.9.29-dev2 to 0.9.29-dev3", true);
lastStepStatus(0);
$system_afxrservers = isset($_POST['system_afxrservers']) ? $_POST['system_afxrservers'] : '';
if (!preg_match('/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})(, ?(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}))*$/i', $system_afxrservers)) {
$system_afxrservers = '';
}
showUpdateStep("Inserting new setting for AFXR server", true);
$db->query("INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES ('system', 'axfrservers', '".$db->escape($system_afxrservers)."');");
lastStepStatus(0);
updateToVersion('0.9.29-dev3');
}

View File

@@ -525,4 +525,12 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
$question.= "Customers: ".makeyesno('allow_themechange_c', '1', '0', '1');
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
if (versionInUpdate($current_version, '0.9.29-dev3')) {
$has_preconfig = true;
$description = 'There is now a possibility to specify AFXR servers for your bind zone-configuration<br />';
$question = '<strong>Enter a comma-separated list of AFXR servers or leave empty (default):</strong>&nbsp;';
$question.= '<input type="text" class="text" name="system_afxrservers" value="" />';
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
}
}