Skip to content

Commit ffedcb9

Browse files
author
Till Brehm
committed
First part of fix for issue #3896 - Unknown column 'default_mailserver' in 'field list' when saving client limits main template
1 parent dc4dd5a commit ffedcb9

File tree

3 files changed

+27
-16
lines changed

3 files changed

+27
-16
lines changed

install/sql/incremental/upd_dev_collection.sql

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,9 @@ UPDATE client SET web_servers = default_webserver WHERE (web_servers = '' OR web
77
UPDATE client SET mail_servers = default_mailserver WHERE (mail_servers = '' OR mail_servers IS NULL);
88
UPDATE client SET xmpp_servers = default_xmppserver WHERE (xmpp_servers = '' OR xmpp_servers IS NULL);
99
UPDATE client SET db_servers = default_dbserver WHERE (db_servers = '' OR db_servers IS NULL);
10-
UPDATE client SET dns_servers = default_dnsserver WHERE (dns_servers = '' OR dns_servers IS NULL);
10+
UPDATE client SET dns_servers = default_dnsserver WHERE (dns_servers = '' OR dns_servers IS NULL);
11+
ALTER TABLE `client_template` ADD `default_slave_dnsserver` INT NOT NULL DEFAULT '0' AFTER `limit_dns_slave_zone`;
12+
ALTER TABLE `client_template` ADD `mail_servers` TEXT NULL DEFAULT NULL AFTER `template_type`;
13+
ALTER TABLE `client_template` ADD `web_servers` TEXT NULL DEFAULT NULL AFTER `limit_xmpp_httparchive`;
14+
ALTER TABLE `client_template` ADD `dns_servers` TEXT NULL DEFAULT NULL AFTER `limit_aps`;
15+
ALTER TABLE `client_template` ADD `db_servers` TEXT NULL DEFAULT NULL AFTER `limit_dns_record`;

install/sql/ispconfig3.sql

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ CREATE TABLE `client` (
170170
`bank_account_swift` varchar(255) DEFAULT NULL,
171171
`paypal_email` varchar(255) DEFAULT NULL,
172172
`default_mailserver` int(11) unsigned NOT NULL DEFAULT '1',
173-
`mail_servers` blob,
173+
`mail_servers` text,
174174
`limit_maildomain` int(11) NOT NULL DEFAULT '-1',
175175
`limit_mailbox` int(11) NOT NULL DEFAULT '-1',
176176
`limit_mailalias` int(11) NOT NULL DEFAULT '-1',
@@ -185,7 +185,7 @@ CREATE TABLE `client` (
185185
`limit_spamfilter_user` int(11) NOT NULL DEFAULT '0',
186186
`limit_spamfilter_policy` int(11) NOT NULL DEFAULT '0',
187187
`default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
188-
`xmpp_servers` blob,
188+
`xmpp_servers` text,
189189
`limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
190190
`limit_xmpp_user` int(11) NOT NULL DEFAULT '-1',
191191
`limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n',
@@ -197,7 +197,7 @@ CREATE TABLE `client` (
197197
`limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n',
198198
`limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n',
199199
`default_webserver` int(11) unsigned NOT NULL DEFAULT '1',
200-
`web_servers` blob,
200+
`web_servers` text,
201201
`limit_web_ip` text,
202202
`limit_web_domain` int(11) NOT NULL DEFAULT '-1',
203203
`limit_web_quota` int(11) NOT NULL DEFAULT '-1',
@@ -222,13 +222,13 @@ CREATE TABLE `client` (
222222
`limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
223223
`limit_aps` int(11) NOT NULL DEFAULT '-1',
224224
`default_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
225-
`db_servers` blob,
225+
`db_servers` text,
226226
`limit_dns_zone` int(11) NOT NULL DEFAULT '-1',
227227
`default_slave_dnsserver` int(11) unsigned NOT NULL DEFAULT '1',
228228
`limit_dns_slave_zone` int(11) NOT NULL DEFAULT '-1',
229229
`limit_dns_record` int(11) NOT NULL DEFAULT '-1',
230230
`default_dbserver` int(11) NOT NULL DEFAULT '1',
231-
`dns_servers` blob,
231+
`dns_servers` text,
232232
`limit_database` int(11) NOT NULL DEFAULT '-1',
233233
`limit_database_user` int(11) NOT NULL DEFAULT '-1',
234234
`limit_database_quota` int(11) NOT NULL default '-1',
@@ -301,6 +301,7 @@ CREATE TABLE `client_template` (
301301
`sys_perm_other` varchar(5) default NULL,
302302
`template_name` varchar(64) NOT NULL DEFAULT '',
303303
`template_type` varchar(1) NOT NULL default 'm',
304+
`mail_servers` text,
304305
`limit_maildomain` int(11) NOT NULL default '-1',
305306
`limit_mailbox` int(11) NOT NULL default '-1',
306307
`limit_mailalias` int(11) NOT NULL default '-1',
@@ -315,7 +316,7 @@ CREATE TABLE `client_template` (
315316
`limit_spamfilter_user` int(11) NOT NULL default '0',
316317
`limit_spamfilter_policy` int(11) NOT NULL default '0',
317318
`default_xmppserver` int(11) unsigned NOT NULL DEFAULT '1',
318-
`xmpp_servers` blob,
319+
`xmpp_servers` text,
319320
`limit_xmpp_domain` int(11) NOT NULL DEFAULT '-1',
320321
`limit_xmpp_user` int(11) NOT NULL DEFAULT '-1',
321322
`limit_xmpp_muc` ENUM( 'n', 'y' ) NOT NULL default 'n',
@@ -325,6 +326,7 @@ CREATE TABLE `client_template` (
325326
`limit_xmpp_status` ENUM( 'n', 'y' ) NOT NULL default 'n',
326327
`limit_xmpp_pastebin` ENUM( 'n', 'y' ) NOT NULL default 'n',
327328
`limit_xmpp_httparchive` ENUM( 'n', 'y' ) NOT NULL default 'n',
329+
`web_servers` text,
328330
`limit_web_ip` text,
329331
`limit_web_domain` int(11) NOT NULL default '-1',
330332
`limit_web_quota` int(11) NOT NULL default '-1',
@@ -348,9 +350,12 @@ CREATE TABLE `client_template` (
348350
`limit_backup` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'y',
349351
`limit_directive_snippets` ENUM( 'n', 'y' ) NOT NULL DEFAULT 'n',
350352
`limit_aps` int(11) NOT NULL DEFAULT '-1',
353+
`dns_servers` text,
351354
`limit_dns_zone` int(11) NOT NULL default '-1',
355+
`default_slave_dnsserver` int(11) NOT NULL DEFAULT '0',
352356
`limit_dns_slave_zone` int(11) NOT NULL default '-1',
353357
`limit_dns_record` int(11) NOT NULL default '-1',
358+
`db_servers` text,
354359
`limit_database` int(11) NOT NULL default '-1',
355360
`limit_database_user` int(11) NOT NULL DEFAULT '-1',
356361
`limit_database_quota` int(11) NOT NULL default '-1',

interface/web/client/form/client_template.tform.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
'maxlength' => '10',
115115
'rows' => '',
116116
'cols' => ''
117-
),
117+
),/*
118118
'default_mailserver' => array (
119119
'datatype' => 'INTEGER',
120120
'formtype' => 'SELECT',
@@ -125,7 +125,7 @@
125125
),
126126
'value' => array(''),
127127
'name' => 'default_mailserver'
128-
),
128+
),*/
129129
'limit_maildomain' => array (
130130
'datatype' => 'INTEGER',
131131
'formtype' => 'TEXT',
@@ -321,7 +321,7 @@
321321
'maxlength' => '10',
322322
'rows' => '',
323323
'cols' => ''
324-
),
324+
),/*
325325
'default_xmppserver' => array (
326326
'datatype' => 'INTEGER',
327327
'formtype' => 'SELECT',
@@ -332,7 +332,7 @@
332332
),
333333
'value' => '',
334334
'name' => 'default_xmppserver'
335-
),
335+
),*/
336336
'xmpp_servers' => array (
337337
'datatype' => 'VARCHAR',
338338
'formtype' => 'MULTIPLE',
@@ -420,7 +420,7 @@
420420
'formtype' => 'CHECKBOX',
421421
'default' => 'n',
422422
'value' => array(0 => 'n', 1 => 'y')
423-
),
423+
),/*
424424
'default_webserver' => array (
425425
'datatype' => 'INTEGER',
426426
'formtype' => 'SELECT',
@@ -431,7 +431,7 @@
431431
),
432432
'value' => array(''),
433433
'name' => 'default_webserver'
434-
),
434+
),*/
435435
'limit_web_domain' => array (
436436
'datatype' => 'INTEGER',
437437
'formtype' => 'TEXT',
@@ -623,7 +623,7 @@
623623
'formtype' => 'CHECKBOX',
624624
'default' => 'n',
625625
'value' => array(0 => 'n', 1 => 'y')
626-
),
626+
),/*
627627
'default_dnsserver' => array (
628628
'datatype' => 'INTEGER',
629629
'formtype' => 'SELECT',
@@ -634,7 +634,7 @@
634634
),
635635
'value' => array(''),
636636
'name' => 'default_dnsserver'
637-
),
637+
),*/
638638
'limit_dns_zone' => array (
639639
'datatype' => 'INTEGER',
640640
'formtype' => 'TEXT',
@@ -704,6 +704,7 @@
704704
'cols' => ''
705705
),
706706
*/
707+
/*
707708
'default_dbserver' => array (
708709
'datatype' => 'INTEGER',
709710
'formtype' => 'SELECT',
@@ -714,7 +715,7 @@
714715
),
715716
'value' => array(''),
716717
'name' => 'default_dbserver'
717-
),
718+
),*/
718719
'limit_database' => array (
719720
'datatype' => 'INTEGER',
720721
'formtype' => 'TEXT',

0 commit comments

Comments
 (0)