Skip to content

Commit b793cfb

Browse files
author
Marius Burkard
committed
Merge branch 'stable-3.1'
2 parents b60b03e + 99441a4 commit b793cfb

File tree

73 files changed

+463
-66
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+463
-66
lines changed

install/dist/conf/debian90.conf.php

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,11 @@
6161
$conf['mysql']['database'] = 'dbispconfig';
6262
$conf['mysql']['admin_user'] = 'root';
6363
$conf['mysql']['admin_password'] = '';
64+
<<<<<<< HEAD
6465
$conf['mysql']['charset'] = 'utf8mb4';
66+
=======
67+
$conf['mysql']['charset'] = 'utf8';
68+
>>>>>>> stable-3.1
6569
$conf['mysql']['ispconfig_user'] = 'ispconfig';
6670
$conf['mysql']['ispconfig_password'] = md5(uniqid(rand()));
6771
$conf['mysql']['master_slave_setup'] = 'n';
@@ -118,10 +122,13 @@
118122
$conf['mailman']['config_dir'] = '/etc/mailman';
119123
$conf['mailman']['init_script'] = 'mailman';
120124

125+
<<<<<<< HEAD
121126
//* mlmmj
122127
$conf['mlmmj']['installed'] = false; // will be detected automatically during installation
123128
$conf['mlmmj']['config_dir'] = '/etc/mlmmj';
124129

130+
=======
131+
>>>>>>> stable-3.1
125132
//* Getmail
126133
$conf['getmail']['installed'] = false; // will be detected automatically during installation
127134
$conf['getmail']['config_dir'] = '/etc/getmail';
@@ -168,7 +175,11 @@
168175
//* PowerDNS
169176
$conf['powerdns']['installed'] = false; // will be detected automatically during installation
170177
$conf['powerdns']['database'] = 'powerdns';
178+
<<<<<<< HEAD
171179
$conf['powerdns']['config_dir'] = '/etc/powerdns/pdns.d';
180+
=======
181+
$conf["powerdns"]["config_dir"] = '/etc/powerdns/pdns.d';
182+
>>>>>>> stable-3.1
172183
$conf['powerdns']['init_script'] = 'pdns';
173184

174185
//* BIND DNS Server
@@ -203,11 +214,19 @@
203214
$conf['nginx']['init_script'] = 'nginx';
204215
$conf['nginx']['vhost_port'] = '8080';
205216
$conf['nginx']['cgi_socket'] = '/var/run/fcgiwrap.socket';
217+
<<<<<<< HEAD
206218
$conf['nginx']['php_fpm_init_script'] = 'php5-fpm';
207219
$conf['nginx']['php_fpm_ini_path'] = '/etc/php5/fpm/php.ini';
208220
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php5/fpm/pool.d';
209221
$conf['nginx']['php_fpm_start_port'] = 9010;
210222
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php5-fpm';
223+
=======
224+
$conf['nginx']['php_fpm_init_script'] = 'php7.0-fpm';
225+
$conf['nginx']['php_fpm_ini_path'] = '/etc/php/7.0/fpm/php.ini';
226+
$conf['nginx']['php_fpm_pool_dir'] = '/etc/php/7.0/fpm/pool.d';
227+
$conf['nginx']['php_fpm_start_port'] = 9010;
228+
$conf['nginx']['php_fpm_socket_dir'] = '/var/lib/php7.0-fpm';
229+
>>>>>>> stable-3.1
211230

212231
//* OpenVZ
213232
$conf['openvz']['installed'] = false;
@@ -227,4 +246,9 @@
227246
//* Metronome XMPP
228247
$conf['xmpp']['installed'] = false;
229248
$conf['xmpp']['init_script'] = 'metronome';
249+
<<<<<<< HEAD
250+
=======
251+
252+
253+
>>>>>>> stable-3.1
230254
?>

install/dist/lib/debian60.lib.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ public function configure_dovecot()
105105
copy('tpl/debian6_dovecot2.conf.master', $config_dir.'/'.$configfile);
106106
}
107107
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
108+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
108109
if(version_compare($dovecot_version,2.1) < 0) {
109110
removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
110111
}

install/dist/lib/fedora.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,8 @@ public function configure_dovecot()
443443
if(version_compare($dovecot_version,2.1) < 0) {
444444
removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
445445
}
446+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
447+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
446448
} else {
447449
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot.conf.master')) {
448450
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/fedora_dovecot.conf.master', $config_dir.'/'.$configfile);

install/dist/lib/opensuse.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ public function configure_dovecot()
450450
} else {
451451
copy('tpl/opensuse_dovecot2.conf.master', $config_dir.'/'.$configfile);
452452
}
453+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
454+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
453455
} else {
454456
if(is_file($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot.conf.master')) {
455457
copy($conf['ispconfig_install_dir'].'/server/conf-custom/install/opensuse_dovecot.conf.master', $config_dir.'/'.$configfile);

install/lib/install.lib.php

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ function get_distname() {
9292
$mainver = $ver;
9393
}
9494
switch ($mainver){
95+
case "17.04":
96+
$relname = "(Zesty Zapus)";
97+
$distconfid = 'ubuntu1604';
98+
break;
9599
case "16.10":
96100
$relname = "(Yakkety Yak)";
97101
$distconfid = 'ubuntu1604';
@@ -204,12 +208,13 @@ function get_distname() {
204208
$distid = 'debian60';
205209
$distbaseid = 'debian';
206210
swriteln("Operating System: Debian 8.0 (Jessie) or compatible\n");
207-
} elseif(substr(trim(file_get_contents('/etc/debian_version')),0,1) == '9') {
211+
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '9') || substr(trim(file_get_contents('/etc/debian_version')),0,1) == '9') {
208212
$distname = 'Debian';
209213
$distver = 'Stretch';
210-
$distid = 'debian90';
214+
$distconfid = 'debian90';
215+
$distid = 'debian60';
211216
$distbaseid = 'debian';
212-
swriteln("Operating System: Debian 9.x (Stretch) or compatible\n");
217+
swriteln("Operating System: Debian 9.0 (Stretch) or compatible\n");
213218
} elseif(strstr(trim(file_get_contents('/etc/debian_version')), '/sid')) {
214219
$distname = 'Debian';
215220
$distver = 'Testing';

install/lib/installer_base.lib.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1353,6 +1353,7 @@ public function configure_dovecot() {
13531353
copy('tpl/debian_dovecot2.conf.master', $config_dir.'/'.$configfile);
13541354
}
13551355
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = postmaster@example.com', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
1356+
replaceLine($config_dir.'/'.$configfile, 'postmaster_address = webmaster@localhost', 'postmaster_address = postmaster@'.$conf['hostname'], 1, 0);
13561357
if(version_compare($dovecot_version, 2.1, '<')) {
13571358
removeLine($config_dir.'/'.$configfile, 'ssl_protocols =');
13581359
}

install/sql/incremental/upd_dev_collection.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ ALTER TABLE `sys_remoteaction` CHANGE `action_state` `action_state` ENUM('pendin
1515
ALTER TABLE `web_domain` CHANGE `folder_directive_snippets` `folder_directive_snippets` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL;
1616
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' AFTER `https_port`;
1717
ALTER TABLE `web_domain` CHANGE `stats_type` `stats_type` VARCHAR(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'awstats';
18-
1918
ALTER TABLE `spamfilter_policy`
2019
CHANGE `virus_lover` `virus_lover` ENUM('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
2120
CHANGE `spam_lover` `spam_lover` ENUM('N','Y') CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'N',
@@ -58,3 +57,6 @@ INSERT INTO `dns_ssl_ca` (`id`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `s
5857
(NULL, 1, 1, 'riud', 'riud', '', 'Y', 'WoSign', 'wosign.com', 'Y', '', 0);
5958

6059
ALTER TABLE `dns_rr` CHANGE `type` `type` ENUM('A','AAAA','ALIAS','CAA','CNAME','DS','HINFO','LOC','MX','NAPTR','NS','PTR','RP','SRV','TXT','TLSA','DNSKEY') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL;
60+
ALTER TABLE `dns_rr` CHANGE `data` `data` TEXT NOT NULL;
61+
ALTER TABLE `web_database` CHANGE `database_quota` `database_quota` INT(11) NULL DEFAULT NULL;
62+
ALTER TABLE `web_domain` ADD `log_retention` INT NOT NULL DEFAULT '30' ;

install/sql/ispconfig3.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1911,7 +1911,7 @@ CREATE TABLE `web_database` (
19111911
`type` varchar(16) NOT NULL DEFAULT 'y',
19121912
`database_name` varchar(64) DEFAULT NULL,
19131913
`database_name_prefix` varchar(50) NOT NULL default '',
1914-
`database_quota` int(11) unsigned DEFAULT NULL,
1914+
`database_quota` int(11) DEFAULT NULL,
19151915
`quota_exceeded` enum('n','y') NOT NULL DEFAULT 'n',
19161916
`last_quota_notification` date NULL default NULL,
19171917
`database_user_id` int(11) unsigned DEFAULT NULL,

install/tpl/server.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ php_ini_path_cgi=/etc/php5/cgi/php.ini
9090
check_apache_config=y
9191
enable_sni=y
9292
enable_spdy=n
93+
skip_le_check=n
9394
enable_ip_wildcard=y
9495
overtraffic_notify_admin=y
9596
overtraffic_notify_client=y

interface/lib/classes/auth.inc.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,20 @@ public function has_clients($userid) {
6464
return false;
6565
}
6666
}
67+
68+
// Function to check if a client belongs to a reseller
69+
public function is_client_of_reseller($userid = 0) {
70+
global $app, $conf;
71+
72+
if($userid == 0) $userid = $_SESSION['s']['user']['userid'];
73+
74+
$client = $app->db->queryOneRecord("SELECT client.sys_userid, client.sys_groupid FROM sys_user, client WHERE sys_user.userid = ? AND sys_user.client_id = client.client_id", $userid);
75+
if($client['sys_userid'] > 1 || $client['sys_groupid'] > 1) {
76+
return true;
77+
} else {
78+
return false;
79+
}
80+
}
6781

6882
//** This function adds a given group id to a given user.
6983
public function add_group_to_user($userid, $groupid) {

0 commit comments

Comments
 (0)