make send-report an option for admin and customer (section: security)
Signed-off-by: Michael Kaufmann (d00p) <d00p@froxlor.org>
This commit is contained in:
@@ -523,6 +523,8 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('system', 'passwordcryptfunc', '1'),
|
||||
('system', 'axfrservers', ''),
|
||||
('system', 'customer_ssl_path', '/etc/ssl/froxlor-custom/'),
|
||||
('system', 'allow_error_report_admin', '1'),
|
||||
('system', 'allow_error_report_customer', '0'),
|
||||
('panel', 'decimal_places', '4'),
|
||||
('panel', 'adminmail', 'admin@SERVERNAME'),
|
||||
('panel', 'phpmyadmin_url', ''),
|
||||
@@ -550,7 +552,7 @@ INSERT INTO `panel_settings` (`settinggroup`, `varname`, `value`) VALUES
|
||||
('panel', 'phpconfigs_hidestdsubdomain', '0'),
|
||||
('panel', 'allow_theme_change_admin', '1'),
|
||||
('panel', 'allow_theme_change_customer', '1'),
|
||||
('panel', 'version', '0.9.31-dev4');
|
||||
('panel', 'version', '0.9.31-dev5');
|
||||
|
||||
|
||||
DROP TABLE IF EXISTS `panel_tasks`;
|
||||
|
||||
@@ -2472,3 +2472,30 @@ if (isFroxlorVersion('0.9.31-dev3')) {
|
||||
|
||||
updateToVersion('0.9.31-dev4');
|
||||
}
|
||||
|
||||
if (isFroxlorVersion('0.9.31-dev4')) {
|
||||
|
||||
showUpdateStep("Updating from 0.9.31-dev4 to 0.9.31-dev5", true);
|
||||
lastStepStatus(0);
|
||||
|
||||
$update_error_report_admin = isset($_POST['update_error_report_admin']) ? (int)$_POST['update_error_report_admin'] : '1';
|
||||
$update_error_report_customer = isset($_POST['update_error_report_customer']) ? (int)$_POST['update_error_report_customer'] : '0';
|
||||
|
||||
showUpdateStep("Adding new error-reporting options");
|
||||
$ins_stmt = Database::prepare("
|
||||
INSERT INTO `".TABLE_PANEL_SETTINGS."` SET `settinggroup` = 'system', `varname` = :varname, `value` = :value
|
||||
");
|
||||
$params = array();
|
||||
// admins
|
||||
$params['varname'] = 'allow_error_report_admin';
|
||||
$params['value'] = $update_error_report_admin;
|
||||
Database::pexecute($ins_stmt, $params);
|
||||
// customer
|
||||
$params['varname'] = 'allow_error_report_customer';
|
||||
$params['value'] = $update_error_report_customer;
|
||||
Database::pexecute($ins_stmt, $params);
|
||||
|
||||
lastStepStatus(0);
|
||||
|
||||
updateToVersion('0.9.31-dev5');
|
||||
}
|
||||
|
||||
@@ -584,11 +584,21 @@ function parseAndOutputPreconfig(&$has_preconfig, &$return, $current_version)
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.31-dev4')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'The template-variable {PASSWORD} has been replaced with {LINK}. Please update your password reset templates!<br />';
|
||||
$question = '';
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
|
||||
if (versionInUpdate($current_version, '0.9.31-dev5')) {
|
||||
$has_preconfig = true;
|
||||
$description = 'You can enbable/disable error-reporting for admins and customers!<br />br />';
|
||||
$question = '<strong>Do you want to enable error-reporting for admins? (default: yes):</strong> ';
|
||||
$question.= makeyesno('update_error_report_admin', '1', '0', '1').'<br />';
|
||||
$question.= '<strong>Do you want to enable error-reporting for customers? (default: no):</strong> ';
|
||||
$question.= makeyesno('update_error_report_customer', '1', '0', '0');
|
||||
eval("\$return.=\"" . getTemplate("update/preconfigitem") . "\";");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user