Commit b418037a authored by Marius Cramer's avatar Marius Cramer
Browse files

- ported some patches

parent a563d594
......@@ -20,7 +20,7 @@ mbox={EMAIL}.
refresh=7200
retry=540
expire=604800
minimum=86400
minimum=3600
ttl=3600
[DNS_RECORDS]
......@@ -134,3 +134,9 @@ CREATE TABLE `xmpp_user` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
-- --------------------------------------------------------
UPDATE `dbispconfig`.`sys_ini` SET `default_logo` = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAABBCAYAAACU5+uOAAAItUlEQVR42u1dCWwVVRStUJZCK6HsFNAgWpaCJkKICZKApKUFhURQpEnZF4EEUJZYEEpBIamgkQpUQBZRW7YCBqQsggsQEAgKLbIGCYsSCNqyQ8D76h18Hd/MvJk/n/bXc5KT+TNz79vPzNv+/2FhAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAe++s0akTsRZxMnE6cGkKcxkwhPofaBPwWRzxxB/EO8UGI8xhxEGoV8EscY8qBKFRcgdoFAhXHC+VUHAbHo5aBQASyrZwL5DoxEjUNeBXI9XIuEMEE1DTgVSA3FA3qIDEtBLnTQiBDUNOAV4EUKhpURojmZQQEAjwKgSwK0bykWQgEU74ABAKBABAIBOIJffoNrkRsS0whDiMO5uNw4gBiSxvfGOJrbDtMOgr2JNa18HmZmETsopnGp4h9xdF0TcQRb8NEPkawTzv2qaWIoybnZYRUBoJD+difGAuBlCy0qsRM4mfERcTFfGygsBUF/xFxE/EQ8RixwIbi/j7il8R3iE8qwuxAXMJxuuFiTvNMYleb/E0gXiI+cOBaISTJrzLxcw2/+8Q5pjjfNNkM0RDILLadpbimw+bsc4DPkxRpuqkZ1orisoBAiguuhkUhPSvZRBA3u6gsK94g9jDFP9aHcAV3EKNNYX8i3RcNJ4M4nTiROJCYykIzbGZKvouk68vYbyS/cUbz+RrJZpzkO5Sv3eajaJhRDvUwg21nKK4VcF5WKPgFH6PZZw/7dJXC6S6l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eR0i2HwfpQ0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQBnG392D9QU+JXhxAAAAAElFTkSuQmCC' WHERE `sys_ini`.`sysini_id` = 1;
ALTER TABLE `directive_snippets` ADD `required_php_snippets` VARCHAR(255) NOT NULL DEFAULT '' AFTER `customer_viewable`;
ALTER TABLE `dns_rr` CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600';
ALTER TABLE `dns_soa` CHANGE `minimum` `minimum` INT(11) UNSIGNED NOT NULL DEFAULT '3600', CHANGE `ttl` `ttl` INT(11) UNSIGNED NOT NULL DEFAULT '3600';
\ No newline at end of file
......@@ -442,6 +442,7 @@ CREATE TABLE IF NOT EXISTS `directive_snippets` (
`type` varchar(255) DEFAULT NULL,
`snippet` mediumtext,
`customer_viewable` ENUM('n','y') NOT NULL DEFAULT 'n',
`required_php_snippets` varchar(255) NOT NULL DEFAULT '',
`active` enum('n','y') NOT NULL DEFAULT 'y',
PRIMARY KEY (`directive_snippets_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
......@@ -465,7 +466,7 @@ CREATE TABLE `dns_rr` (
`type` enum('A','AAAA','ALIAS','CNAME','HINFO','MX','NAPTR','NS','PTR','RP','SRV','TXT') default NULL,
`data` TEXT NOT NULL DEFAULT '',
`aux` int(11) unsigned NOT NULL default '0',
`ttl` int(11) unsigned NOT NULL default '86400',
`ttl` int(11) unsigned NOT NULL default '3600',
`active` enum('N','Y') NOT NULL default 'Y',
`stamp` timestamp NOT NULL default CURRENT_TIMESTAMP,
`serial` int(10) unsigned default NULL,
......@@ -517,8 +518,8 @@ CREATE TABLE `dns_soa` (
`refresh` int(11) unsigned NOT NULL default '28800',
`retry` int(11) unsigned NOT NULL default '7200',
`expire` int(11) unsigned NOT NULL default '604800',
`minimum` int(11) unsigned NOT NULL default '86400',
`ttl` int(11) unsigned NOT NULL default '86400',
`minimum` int(11) unsigned NOT NULL default '3600',
`ttl` int(11) unsigned NOT NULL default '3600',
`active` enum('N','Y') NOT NULL DEFAULT 'N',
`xfer` varchar(255) NOT NULL DEFAULT '',
`also_notify` varchar(255) default NULL,
......@@ -2316,7 +2317,7 @@ INSERT INTO `country` (`iso`, `name`, `printable_name`, `iso3`, `numcode`, `eu`)
-- Dumping data for table `dns_template`
--
INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=86400\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y');
INSERT INTO `dns_template` (`template_id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`, `name`, `fields`, `template`, `visible`) VALUES (1, 1, 1, 'riud', 'riud', '', 'Default', 'DOMAIN,IP,NS1,NS2,EMAIL,DKIM', '[ZONE]\norigin={DOMAIN}.\nns={NS1}.\nmbox={EMAIL}.\nrefresh=7200\nretry=540\nexpire=604800\nminimum=3600\nttl=3600\n\n[DNS_RECORDS]\nA|{DOMAIN}.|{IP}|0|3600\nA|www|{IP}|0|3600\nA|mail|{IP}|0|3600\nNS|{DOMAIN}.|{NS1}.|0|3600\nNS|{DOMAIN}.|{NS2}.|0|3600\nMX|{DOMAIN}.|mail.{DOMAIN}.|10|3600\nTXT|{DOMAIN}.|v=spf1 mx a ~all|0|3600', 'y');
-- --------------------------------------------------------
......
......@@ -62,8 +62,10 @@ class validate_dkim {
*/
function check_template($field_name, $field_value, $validator) {
$dkim=false;
foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; }
if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']);
if(is_array($field_value) && !empty($field_value)){
foreach($field_value as $field ) { if($field == 'DKIM') $dkim=true; }
if ($dkim && $field_value[0]!='DOMAIN') return $this->get_error($validator['errmsg']);
}
}
......
......@@ -105,6 +105,17 @@ $form["tabs"]['directive_snippets'] = array (
'default' => 'y',
'value' => array(0 => 'n', 1 => 'y')
),
'required_php_snippets' => array (
'datatype' => 'VARCHAR',
'formtype' => 'CHECKBOXARRAY',
'default' => '',
'datasource' => array ( 'type' => 'SQL',
'querystring' => "SELECT directive_snippets_id,name FROM directive_snippets WHERE type = 'php' AND active = 'y'ORDER BY name",
'keyfield' => 'directive_snippets_id',
'valuefield' => 'name'
),
'separator' => ',',
),
//#################################
// ENDE Datatable fields
//#################################
......
......@@ -17,6 +17,12 @@
<div class="form-group">
<label for="snippet" class="col-sm-3 control-label">{tmpl_var name='snippet_txt'}</label>
<div class="col-sm-9"><textarea class="form-control" name="snippet" id="snippet" rows='10' cols='50'>{tmpl_var name='snippet'}</textarea></div><span class="nginx"> &nbsp; {tmpl_var name='variables_txt'}: </span><a href="javascript:void(0);" class="addPlaceholder nginx">{DOCROOT}</a><span class="nginx">, </span><a href="javascript:void(0);" class="addPlaceholder nginx">{FASTCGIPASS}</a>
</div>
<div class="form-group php">
<label class="col-sm-3 control-label">{tmpl_var name='required_php_snippets_txt'}</label>
<div class="col-sm-9">
{tmpl_var name='required_php_snippets'}
</div>
</div>
<div class="form-group">
<label class="col-sm-3 control-label">{tmpl_var name='customer_viewable_txt'}</label>
......@@ -48,15 +54,19 @@
if (jQuery('#type').val() != 'nginx' && jQuery('#type').val() != 'apache') {
jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
}else {
jQuery('.php:visible').hide();
} else {
jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show();
jQuery('.php:hidden').show();
}
jQuery('#type').change(function(){
if (jQuery(this).val() != 'nginx' && jQuery(this).val() != 'apache') {
jQuery('#customer_viewable').closest('div.ctrlHolder:visible').hide();
jQuery('.php:visible').hide();
} else {
jQuery('#customer_viewable').closest('div.ctrlHolder:hidden').show();
jQuery('.php:hidden').show();
}
if(jQuery(this).val() == 'nginx'){
jQuery('.nginx:hidden').show();
......
......@@ -133,7 +133,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -126,7 +126,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -142,7 +142,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -120,7 +120,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -132,7 +132,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -141,7 +141,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -140,7 +140,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -133,7 +133,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -197,7 +197,7 @@ $form["tabs"]['dns_soa'] = array (
'range' => '60:',
'errmsg'=> 'minimum_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -127,7 +127,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -131,7 +131,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -137,7 +137,7 @@ $form["tabs"]['dns'] = array (
'range' => '60:',
'errmsg'=> 'ttl_range_error'),
),
'default' => '86400',
'default' => '3600',
'value' => '',
'width' => '10',
'maxlength' => '10'
......
......@@ -132,7 +132,7 @@ $liste["item"][] = array( 'field' => "type",
'prefix' => "",
'suffix' => "",
'width' => "",
'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SRV'=>'SRV', 'TXT'=>'TXT'));
'value' => array('A'=>'A', 'AAAA' => 'AAAA', 'ALIAS'=>'ALIAS', 'CNAME'=>'CNAME', 'HINFO'=>'HINFO', 'MX'=>'MX', 'NS'=>'NS', 'PTR'=>'PTR', 'RP'=>'RP', 'SPF'=>'SPF', 'SRV'=>'SRV', 'TXT'=>'TXT'));
?>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment