Skip to content

Commit 80d71cf

Browse files
committed
Merge branch 'develop' of git.ispconfig.org:ispconfig/ispconfig3 into develop
2 parents b3e8b00 + dc17335 commit 80d71cf

31 files changed

+104
-21
lines changed

install/lib/update.lib.php

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,4 +459,49 @@ function check_service_config_state($servicename, $detected_value) {
459459
} else return $current_state;
460460
}
461461

462+
/**
463+
* Check for existing conf-custom templates and offer to rename them.
464+
*/
465+
function checkAndRenameCustomTemplates($default_prompt='no') {
466+
global $inst;
467+
$ret = true;
468+
469+
$default_prompt = ($default_prompt == 'yes') ? 'yes' : 'no';
470+
471+
$template_directories = array(
472+
'/usr/local/ispconfig/server/conf-custom',
473+
'/usr/local/ispconfig/server/conf-custom/install',
474+
);
475+
476+
$found_templates = array();
477+
foreach ($template_directories as $dir) {
478+
if (!is_dir($dir)) { continue; }
479+
foreach (glob("$dir/*.master") as $f) {
480+
if (is_file($f)) {
481+
$found_templates[] = $f;
482+
}
483+
}
484+
}
485+
486+
if (count($found_templates) > 0) {
487+
echo "The following custom templates were found:\n\n";
488+
echo implode("\n", $found_templates) . "\n\n";
489+
490+
$answer = $inst->simple_query('Do you want to rename these conf-custom templates now so the default templates are used?', array('yes', 'no'), $default_prompt, 'rename_custom_templates');
491+
if (strtolower($answer) == 'yes') {
492+
$date=date('-Y-m-d_H-i');
493+
foreach ($found_templates as $f) {
494+
if (!rename($f, $f.$date)) {
495+
echo "Error renaming template $f\n";
496+
$ret = false;
497+
}
498+
}
499+
} else {
500+
$ret = null;
501+
}
502+
}
503+
504+
return $ret;
505+
}
506+
462507
?>

install/tpl/system.ini.master

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ tab_change_discard=n
5555
tab_change_warning=n
5656
use_loadindicator=y
5757
use_combobox=y
58+
show_support_messages=y
5859
maintenance_mode=n
5960
maintenance_mode_exclude_ips=
6061
admin_dashlets_left=

install/update.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,8 @@
370370

371371
if($reconfigure_services_answer == 'yes' || $reconfigure_services_answer == 'selected') {
372372

373+
checkAndRenameCustomTemplates();
374+
373375
if($conf['services']['mail']) {
374376

375377
//** Configure postfix
@@ -483,10 +485,10 @@
483485

484486
}
485487

486-
if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
487-
//** Configure Metronome XMPP
488-
$inst->configure_xmpp('dont-create-certs');
489-
}
488+
if($conf['services']['xmpp'] && $inst->reconfigure_app('XMPP', $reconfigure_services_answer)) {
489+
//** Configure Metronome XMPP
490+
$inst->configure_xmpp('dont-create-certs');
491+
}
490492

491493
if($conf['services']['firewall'] && $inst->reconfigure_app('Firewall', $reconfigure_services_answer)) {
492494
if($conf['ufw']['installed'] == true) {

interface/web/admin/form/system_config.tform.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -619,6 +619,12 @@
619619
'default' => 'y',
620620
'value' => array(0 => 'n', 1 => 'y')
621621
),
622+
'show_support_messages' => array (
623+
'datatype' => 'VARCHAR',
624+
'formtype' => 'CHECKBOX',
625+
'default' => 'y',
626+
'value' => array(0 => 'n', 1 => 'y')
627+
),
622628
'maintenance_mode' => array (
623629
'datatype' => 'VARCHAR',
624630
'formtype' => 'CHECKBOX',

interface/web/admin/lib/lang/ar_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
9999
$wb['btn_cancel_txt'] = 'Cancel';
100100
$wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
101101
$wb['client_protection_txt'] = 'Client protection';
102+
$wb['show_support_messages_txt'] = 'Show message function in help module';
102103
?>

interface/web/admin/lib/lang/bg_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
9999
$wb['btn_cancel_txt'] = 'Cancel';
100100
$wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
101101
$wb['client_protection_txt'] = 'Client protection';
102+
$wb['show_support_messages_txt'] = 'Show message function in help module';
102103
?>

interface/web/admin/lib/lang/br_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Salvar';
9999
$wb['btn_cancel_txt'] = 'Cancelar';
100100
$wb['web_php_options_txt'] = 'Manipulador do php (Somente apache)';
101101
$wb['client_protection_txt'] = 'Client protection';
102+
$wb['show_support_messages_txt'] = 'Show message function in help module';
102103
?>

interface/web/admin/lib/lang/ca_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Save';
9999
$wb['btn_cancel_txt'] = 'Cancel';
100100
$wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
101101
$wb['client_protection_txt'] = 'Client protection';
102+
$wb['show_support_messages_txt'] = 'Show message function in help module';
102103
?>

interface/web/admin/lib/lang/cz_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,5 @@ $wb['btn_save_txt'] = 'Uložit';
9999
$wb['btn_cancel_txt'] = 'Zrušit';
100100
$wb['web_php_options_txt'] = 'PHP Handler (Apache only)';
101101
$wb['client_protection_txt'] = 'Client protection';
102+
$wb['show_support_messages_txt'] = 'Show message function in help module';
102103
?>

interface/web/admin/lib/lang/de_system_config.lng

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,4 +103,5 @@ $wb['btn_save_txt'] = 'Speichern';
103103
$wb['btn_cancel_txt'] = 'Abbrechen';
104104
$wb['web_php_options_txt'] = 'PHP Handler (Nur Apache)';
105105
$wb['client_protection_txt'] = 'Client protection';
106+
$wb['show_support_messages_txt'] = 'Show message function in help module';
106107
?>

0 commit comments

Comments
 (0)