From c220da99596c4fbca3a4413dbf880dbfc8fd0121 Mon Sep 17 00:00:00 2001
From: Florian Schaal <florian@schaal-24.de>
Date: Fri, 24 Jan 2014 06:20:12 -0500
Subject: [PATCH] changed sql-query and make ure that the backup-sub-dir exists
---
interface/web/admin/form/server_config.tform.php | 307 +++++++++++++++++++++++++++++---------------------
1 files changed, 176 insertions(+), 131 deletions(-)
diff --git a/interface/web/admin/form/server_config.tform.php b/interface/web/admin/form/server_config.tform.php
index 298894a..89165ec 100644
--- a/interface/web/admin/form/server_config.tform.php
+++ b/interface/web/admin/form/server_config.tform.php
@@ -55,9 +55,9 @@
'width' => 70,
'template' => "templates/server_config_server_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'auto_network_configuration' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -83,22 +83,24 @@
'errmsg' => 'netmask_error_wrong'),
),
'value' => '',
- 'width' => '15',
- 'maxlength' => '255'
+ 'width' => '15',
+ 'maxlength' => '255'
),
- /*
- 'v6_prefix' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'validators' => array(0 => array('type' => 'ISV6PREFIX',
- 'errmsg' => 'v6_prefix_wrong'),
- ),
- 'default' => ''
+ 'v6_prefix' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'validators' => array( 0 => array('type' => 'ISV6PREFIX',
+ 'errmsg' => 'v6_prefix_wrong'),
+ 1 => array('type' => 'V6PREFIXEND',
+ 'errmsg' => 'v6_prefix_end'),
+ 2 => array('type' => 'V6PREFIXLENGTH',
+ 'errmsg' => 'v6_prefix_length')
+ ),
+ 'default' => ''
),
- */
- 'gateway' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
+ 'gateway' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
'default' => '192.168.0.1',
'validators' => array(0 => array('type' => 'ISIPV4',
'errmsg' => 'gateway_error_wrong'),
@@ -119,13 +121,13 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => 'server1.domain.tld',
- 'filters' => array( 0 => array( 'event' => 'SAVE',
- 'type' => 'IDNTOASCII'),
- 1 => array( 'event' => 'SHOW',
- 'type' => 'IDNTOUTF8'),
- 2 => array( 'event' => 'SAVE',
- 'type' => 'TOLOWER')
- ),
+ 'filters' => array( 0 => array( 'event' => 'SAVE',
+ 'type' => 'IDNTOASCII'),
+ 1 => array( 'event' => 'SHOW',
+ 'type' => 'IDNTOUTF8'),
+ 2 => array( 'event' => 'SAVE',
+ 'type' => 'TOLOWER')
+ ),
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'hostname_error_empty'),
),
@@ -171,6 +173,20 @@
'width' => '40',
'maxlength' => '255'
),
+ 'backup_dir_is_mount' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'backup_dir_mount_cmd' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '',
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
'backup_mode' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -179,14 +195,20 @@
'width' => '40',
'maxlength' => '255'
),
+ 'backup_delete' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'y',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
'monit_url' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
- 'errmsg'=> 'monit_url_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'monit_url_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -211,10 +233,10 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
- 'errmsg'=> 'munin_url_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^[0-9a-zA-Z\:\/\-\.\[\]]{0,255}$/',
+ 'errmsg'=> 'munin_url_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -235,9 +257,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -246,9 +268,9 @@
'width' => 60,
'template' => "templates/server_config_mail_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'module' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -277,19 +299,19 @@
'width' => '40',
'maxlength' => '255'
),
- 'dkim_path' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
- 'default' => '/var/lib/amavis/dkim',
- 'validators' => array ( 0 => array ('type' => 'CUSTOM',
- 'class' => 'validate_dkim',
- 'function' => 'check_dkim_path',
- 'errmsg'=> 'dkim_path_error'),
- ),
- 'value' => '',
- 'width' => '40',
- 'maxlength' => '255'
- ),
+ 'dkim_path' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
+ 'default' => '/var/lib/amavis/dkim',
+ 'validators' => array ( 0 => array ('type' => 'CUSTOM',
+ 'class' => 'validate_dkim',
+ 'function' => 'check_dkim_path',
+ 'errmsg'=> 'dkim_path_error'),
+ ),
+ 'value' => '',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
'pop3_imap_daemon' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -346,6 +368,12 @@
'width' => '10',
'maxlength' => '255'
),
+ 'mailbox_virtual_uidgid_maps' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
'relayhost' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -390,16 +418,16 @@
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'y',
- 'value' => array(0 => 'n',1 => 'y')
+ 'value' => array(0 => 'n', 1 => 'y')
),
'realtime_blackhole_list' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array ( 0 => array ( 'type' => 'REGEX',
- 'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
- 'errmsg'=> 'rbl_error_regex'),
- ),
+ 'validators' => array ( 0 => array ( 'type' => 'REGEX',
+ 'regex' => '/^((([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9])(,\s*(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)+([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\-]*[A-Za-z0-9]))*)?$/',
+ 'errmsg'=> 'rbl_error_regex'),
+ ),
'value' => '',
'width' => '40',
'maxlength' => '255'
@@ -421,8 +449,8 @@
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
- 'width' => '20',
- 'maxlength' => '255'
+ 'width' => '20',
+ 'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
@@ -430,9 +458,9 @@
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -441,9 +469,9 @@
'width' => 80,
'template' => "templates/server_config_getmail_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'getmail_config_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -455,9 +483,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -466,9 +494,9 @@
'width' => 60,
'template' => "templates/server_config_web_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'server_type' => array(
'datatype' => 'VARCHAR',
'formtype' => 'SELECT',
@@ -512,27 +540,27 @@
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
- 'value' => array(0 => 'n',1 => 'y')
+ 'value' => array(0 => 'n', 1 => 'y')
),
'website_autoalias' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
'value' => '',
- 'width' => '40',
- 'maxlength' => '255'
- ),
-/*
-'vhost_rewrite_v6' => array (
-'datatype' => 'VARCHAR',
-'formtype' => 'CHECKBOX',
-'default' => 'n',
-'value' => array(0 => 'n',1 => 'y')
-),
-*/
- 'vhost_conf_dir' => array(
- 'datatype' => 'VARCHAR',
- 'formtype' => 'TEXT',
+ 'width' => '40',
+ 'maxlength' => '255'
+ ),
+ /*
+'vhost_rewrite_v6' => array (
+'datatype' => 'VARCHAR',
+'formtype' => 'CHECKBOX',
+'default' => 'n',
+'value' => array(0 => 'n',1 => 'y')
+),
+*/
+ 'vhost_conf_dir' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'TEXT',
'default' => '',
'validators' => array(0 => array('type' => 'NOTEMPTY',
'errmsg' => 'vhost_conf_dir_error_empty'),
@@ -661,8 +689,8 @@
'formtype' => 'TEXT',
'default' => '7',
'value' => '',
- 'width' => '20',
- 'maxlength' => '255'
+ 'width' => '20',
+ 'maxlength' => '255'
),
'overquota_notify_onok' => array(
'datatype' => 'VARCHAR',
@@ -819,6 +847,17 @@
'width' => '40',
'maxlength' => '4000'
),
+ 'php_ini_check_minutes' => array(
+ 'datatype' => 'INTEGER',
+ 'formtype' => 'TEXT',
+ 'default' => '1',
+ 'validators' => array(0 => array('type' => 'NOTEMPTY',
+ 'errmsg' => 'php_ini_check_minutes_error_empty'),
+ ),
+ 'value' => '',
+ 'width' => '10',
+ 'maxlength' => '255'
+ ),
'nginx_cgi_socket' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -903,9 +942,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -914,9 +953,9 @@
'width' => 60,
'template' => "templates/server_config_dns_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'bind_user' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -972,9 +1011,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -983,9 +1022,9 @@
'width' => 80,
'template' => "templates/server_config_fastcgi_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'fastcgi_starter_path' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -1045,11 +1084,11 @@
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
'default' => '',
- 'validators' => array( 0 => array( 'type' => 'ISINT',
- 'errmsg' => 'fastcgi_max_requests_error_empty'),
- 1 => array( 'type' => 'RANGE',
- 'range' => '0:',
- 'errmsg' => 'fastcgi_max_requests_error_empty'),
+ 'validators' => array( 0 => array( 'type' => 'ISINT',
+ 'errmsg' => 'fastcgi_max_requests_error_empty'),
+ 1 => array( 'type' => 'RANGE',
+ 'range' => '0:',
+ 'errmsg' => 'fastcgi_max_requests_error_empty'),
),
'value' => '',
'width' => '40',
@@ -1074,9 +1113,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1086,9 +1125,9 @@
'width' => 80,
'template' => "templates/server_config_jailkit_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'jailkit_chroot_home' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -1133,9 +1172,9 @@
'width' => '40',
'maxlength' => '1000'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1208,9 +1247,9 @@
'width' => 80,
'template' => "templates/server_config_vlogger_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'config_dir' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -1222,9 +1261,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1235,9 +1274,9 @@
'width' => 80,
'template' => "templates/server_config_cron_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'init_script' => array(
'datatype' => 'VARCHAR',
'formtype' => 'TEXT',
@@ -1271,9 +1310,9 @@
'width' => '40',
'maxlength' => '255'
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
@@ -1282,9 +1321,9 @@
'width' => 80,
'template' => "templates/server_config_rescue_edit.htm",
'fields' => array(
- ##################################
- # Begin Datatable fields
- ##################################
+ //#################################
+ // Begin Datatable fields
+ //#################################
'try_rescue' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
@@ -1292,6 +1331,12 @@
'value' => array(0 => 'n', 1 => 'y')
),
'do_not_try_rescue_httpd' => array(
+ 'datatype' => 'VARCHAR',
+ 'formtype' => 'CHECKBOX',
+ 'default' => 'n',
+ 'value' => array(0 => 'n', 1 => 'y')
+ ),
+ 'do_not_try_rescue_mongodb' => array(
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOX',
'default' => 'n',
@@ -1309,9 +1354,9 @@
'default' => 'n',
'value' => array(0 => 'n', 1 => 'y')
),
- ##################################
- # ENDE Datatable fields
- ##################################
+ //#################################
+ // ENDE Datatable fields
+ //#################################
)
);
?>
--
Gitblit v1.9.1