Skip to content

Commit 1139530

Browse files
author
Marius Cramer
committed
Merge remote-tracking branch 'origin/stable-3.0.5'
Conflicts: install/lib/update.lib.php install/sql/incremental/upd_0058.sql install/tpl/server.ini.master interface/lib/classes/remoting_lib.inc.php interface/lib/classes/tform.inc.php interface/web/admin/form/server_config.tform.php interface/web/mail/templates/mail_domain_edit.htm server/cron_daily.php server/lib/classes/monitor_tools.inc.php server/mods-available/monitor_core_module.inc.php server/plugins-available/mail_plugin_dkim.inc.php
2 parents 30be244 + 992797f commit 1139530

File tree

856 files changed

+7939
-9605
lines changed

Some content is hidden

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

856 files changed

+7939
-9605
lines changed

install/autoupdate.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@
285285
//if(@is_dir('/etc/Bastille')) {
286286
//* Configure Firewall
287287
swriteln('Configuring Firewall');
288-
$inst->configure_bastille_firewall();
288+
$inst->configure_firewall();
289289
//}
290290

291291
//** Configure ISPConfig

install/dist/lib/fedora.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -858,6 +858,7 @@ public function install_ispconfig()
858858
$content = str_replace('{language}', $conf['language'], $content);
859859
$content = str_replace('{timezone}', $conf['timezone'], $content);
860860
$content = str_replace('{theme}', $conf['theme'], $content);
861+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
861862

862863
wf("$install_dir/interface/lib/$configfile", $content);
863864

@@ -882,6 +883,7 @@ public function install_ispconfig()
882883
$content = str_replace('{language}', $conf['language'], $content);
883884
$content = str_replace('{timezone}', $conf['timezone'], $content);
884885
$content = str_replace('{theme}', $conf['theme'], $content);
886+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
885887

886888
wf("$install_dir/server/lib/$configfile", $content);
887889

install/dist/lib/gentoo.lib.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,7 @@ public function install_ispconfig()
738738
$content = str_replace('{language}', $conf['language'], $content);
739739
$content = str_replace('{timezone}', $conf['timezone'], $content);
740740
$content = str_replace('{theme}', $conf['theme'], $content);
741+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
741742

742743
$this->write_config_file("$install_dir/interface/lib/$configfile", $content);
743744

install/dist/lib/opensuse.lib.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,7 @@ public function install_ispconfig()
913913
$content = str_replace('{language}', $conf['language'], $content);
914914
$content = str_replace('{timezone}', $conf['timezone'], $content);
915915
$content = str_replace('{theme}', $conf['theme'], $content);
916+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
916917

917918
wf("$install_dir/interface/lib/$configfile", $content);
918919

@@ -937,6 +938,7 @@ public function install_ispconfig()
937938
$content = str_replace('{language}', $conf['language'], $content);
938939
$content = str_replace('{timezone}', $conf['timezone'], $content);
939940
$content = str_replace('{theme}', $conf['theme'], $content);
941+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
940942

941943
wf("$install_dir/server/lib/$configfile", $content);
942944

install/install.php

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,9 @@
108108
$conf['language'] = $inst->simple_query('Select language', array('en','de'), 'en');
109109
$conf['timezone'] = get_system_timezone();
110110

111-
//* Set defaukt theme
111+
//* Set default theme
112112
$conf['theme'] = 'default';
113+
$conf['language_file_import_enabled'] = true;
113114

114115
//** Select installation mode
115116
$install_mode = $inst->simple_query('Installation mode', array('standard','expert'), 'standard');
@@ -259,17 +260,10 @@
259260
$inst->configure_apps_vhost();
260261

261262
//* Configure Firewall
262-
if($conf['ufw']['installed'] == true) {
263-
//* Configure Ubuntu Firewall
264-
$conf['services']['firewall'] = true;
265-
swriteln('Configuring Ubuntu Firewall');
266-
$inst->configure_ufw_firewall();
267-
} else {
268-
//* Configure Bastille Firewall
269-
$conf['services']['firewall'] = true;
270-
swriteln('Configuring Bastille Firewall');
271-
$inst->configure_bastille_firewall();
272-
}
263+
//* Configure Bastille Firewall
264+
$conf['services']['firewall'] = true;
265+
swriteln('Configuring Bastille Firewall');
266+
$inst->configure_firewall();
273267

274268
//* Configure Fail2ban
275269
if($conf['fail2ban']['installed'] == true) {
@@ -337,7 +331,7 @@
337331
if($conf['bind']['installed'] == true && $conf['bind']['init_script'] != '' && is_executable($conf['init_scripts'].'/'.$conf['bind']['init_script'])) system($conf['init_scripts'].'/'.$conf['bind']['init_script'].' restart &> /dev/null');
338332
//if($conf['squid']['installed'] == true && $conf['squid']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['squid']['init_script'])) system($conf['init_scripts'].'/'.$conf['squid']['init_script'].' restart &> /dev/null');
339333
if($conf['nginx']['installed'] == true && $conf['nginx']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['nginx']['init_script'])) system($conf['init_scripts'].'/'.$conf['nginx']['init_script'].' restart &> /dev/null');
340-
if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['ufw']['init_script'])) system($conf['init_scripts'].'/'.$conf['ufw']['init_script'].' restart &> /dev/null');
334+
//if($conf['ufw']['installed'] == true && $conf['ufw']['init_script'] != '' && is_file($conf['init_scripts'].'/'.$conf['ufw']['init_script'])) system($conf['init_scripts'].'/'.$conf['ufw']['init_script'].' restart &> /dev/null');
341335
}else{
342336

343337
//* In expert mode, we select the services in the following steps, only db is always available
@@ -553,17 +547,18 @@
553547

554548
//** Configure Firewall
555549
if(strtolower($inst->simple_query('Configure Firewall Server',array('y','n'),'y')) == 'y') {
556-
if($conf['ufw']['installed'] == true) {
550+
//if($conf['bastille']['installed'] == true) {
551+
//* Configure Bastille Firewall
552+
$conf['services']['firewall'] = true;
553+
swriteln('Configuring Bastille Firewall');
554+
$inst->configure_firewall();
555+
/*} elseif($conf['ufw']['installed'] == true) {
557556
//* Configure Ubuntu Firewall
558557
$conf['services']['firewall'] = true;
559558
swriteln('Configuring Ubuntu Firewall');
560559
$inst->configure_ufw_firewall();
561-
} else {
562-
//* Configure Bastille Firewall
563-
$conf['services']['firewall'] = true;
564-
swriteln('Configuring Bastille Firewall');
565-
$inst->configure_bastille_firewall();
566560
}
561+
*/
567562
}
568563

569564
//** Configure Firewall

install/lib/installer_base.lib.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ public function find_installed_apps() {
132132
if(is_installed('named') || is_installed('bind') || is_installed('bind9')) $conf['bind']['installed'] = true;
133133
if(is_installed('squid')) $conf['squid']['installed'] = true;
134134
if(is_installed('nginx')) $conf['nginx']['installed'] = true;
135-
if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true;
135+
// if(is_installed('iptables') && is_installed('ufw')) $conf['ufw']['installed'] = true;
136136
if(is_installed('fail2ban-server')) $conf['fail2ban']['installed'] = true;
137137
if(is_installed('vzctl')) $conf['openvz']['installed'] = true;
138138
if(is_dir("/etc/Bastille")) $conf['bastille']['installed'] = true;
@@ -1387,6 +1387,7 @@ public function configure_squid()
13871387
exec('chown root:root '.$conf["squid"]["config_dir"].'/'.$configfile);
13881388
}
13891389

1390+
/*
13901391
public function configure_ufw_firewall()
13911392
{
13921393
$configfile = 'ufw.conf';
@@ -1396,8 +1397,9 @@ public function configure_ufw_firewall()
13961397
exec('chmod 600 /etc/ufw/ufw.conf');
13971398
exec('chown root:root /etc/ufw/ufw.conf');
13981399
}
1400+
*/
13991401

1400-
public function configure_bastille_firewall() {
1402+
public function configure_firewall() {
14011403
global $conf;
14021404

14031405
$dist_init_scripts = $conf['init_scripts'];
@@ -1713,6 +1715,7 @@ public function install_ispconfig() {
17131715
$content = str_replace('{language}', $conf['language'], $content);
17141716
$content = str_replace('{timezone}', $conf['timezone'], $content);
17151717
$content = str_replace('{theme}', $conf['theme'], $content);
1718+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
17161719

17171720
wf($install_dir.'/interface/lib/'.$configfile, $content);
17181721

@@ -1737,6 +1740,7 @@ public function install_ispconfig() {
17371740
$content = str_replace('{language}', $conf['language'], $content);
17381741
$content = str_replace('{timezone}', $conf['timezone'], $content);
17391742
$content = str_replace('{theme}', $conf['theme'], $content);
1743+
$content = str_replace('{language_file_import_enabled}', ($conf['language_file_import_enabled'] == true)?'true':'false', $content);
17401744

17411745
wf($install_dir.'/server/lib/'.$configfile, $content);
17421746

install/lib/update.lib.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,11 @@ function updateDbAndIni() {
169169
if(is_file($php_patch_filename)) {
170170
$php_patch_class_name = 'upd_'.str_pad($next_db_version, 4, '0', STR_PAD_LEFT);
171171
include_once($php_patch_filename);
172-
$php_patch = new $php_patch_class_name;
172+
if(class_exists($php_patch_class_name)) {
173+
$php_patch = new $php_patch_class_name;
174+
} else {
175+
swriteln($inst->lng('WARNING: PHP patch file').': '.$php_patch_filename.' '.$inst->lng('contains errors.'));
176+
}
173177
}
174178

175179
//* Exec onBeforeSQL function
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
1-
ALTER TABLE `client_template` CHANGE `limit_aps` `limit_aps` INT( 11 ) NOT NULL DEFAULT '-1';
2-
ALTER TABLE `web_backup` ADD `filesize` VARCHAR(10) NOT NULL AFTER `filename`;
1+
ALTER TABLE `client_template` CHANGE `limit_aps` `limit_aps` INT( 11 ) NOT NULL DEFAULT '-1';
Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
ALTER TABLE `client_template` CHANGE `limit_aps` `limit_aps` INT( 11 ) NOT NULL DEFAULT '-1';
2-
ALTER TABLE `mail_domain` ADD `dkim_public` MEDIUMTEXT NOT NULL AFTER `domain`;
3-
ALTER TABLE `mail_domain` ADD `dkim_private` MEDIUMTEXT NOT NULL AFTER `domain`;
4-
ALTER TABLE `mail_domain` ADD `dkim` ENUM( 'n', 'y' ) NOT NULL AFTER `domain`;
5-
ALTER TABLE `client` ADD `default_slave_dnsserver` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `limit_dns_zone`;
1+
ALTER TABLE `client` ADD `default_slave_dnsserver` INT( 11 ) UNSIGNED NOT NULL DEFAULT '1' AFTER `limit_dns_zone`;
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
ALTER TABLE `web_backup` CHANGE `backup_type` `backup_type` enum('web','mongodb','mysql') NOT NULL DEFAULT 'web';
2-
ALTER TABLE `web_database_user` ADD `database_password_mongo` varchar(32) DEFAULT NULL AFTER `database_password`;
3-
ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;
1+
ALTER TABLE `sys_datalog` ADD `error` MEDIUMTEXT NULL DEFAULT NULL;

0 commit comments

Comments
 (0)