Merge pull request #3632 from doktornotor/patch-21

This commit is contained in:
Steve Beaver 2017-03-20 09:30:07 -04:00
commit d07d7ba6e6
9 changed files with 23 additions and 17 deletions

View File

@ -117,6 +117,7 @@ if (isset($_POST['create_alias']) && (is_hostname($host) || is_ipaddr($host))) {
} else {
$a_aliases[] = $newalias;
}
write_config(gettext("Created an alias from Diagnostics - DNS Lookup page."));
write_config();
$createdalias = true;
}

View File

@ -93,24 +93,24 @@ $evaledvar = $config['installedpackages'][xml_safe_fieldname($pkg['name'])]['con
if ($_REQUEST['act'] == "update") {
if (is_array($config['installedpackages'][$pkg['name']]) && $pkg['name'] != "" && $_REQUEST['ids'] !="") {
#get current values
// get current values
$current_values=$config['installedpackages'][$pkg['name']]['config'];
#get updated ids
// get updated ids
parse_str($_REQUEST['ids'], $update_list);
#sort ids to know what to change
#useful to do not lose data when using sorting and paging
// sort ids to know what to change
// useful to do not lose data when using sorting and paging
$sort_list=$update_list['ids'];
sort($sort_list);
#apply updates
// apply updates
foreach ($update_list['ids'] as $key=> $value) {
$config['installedpackages'][$pkg['name']]['config'][$sort_list[$key]]=$current_values[$update_list['ids'][$key]];
}
#save current config
write_config();
#sync package
// save current config
write_config(gettext("Package configuration changes saved from package settings page."));
// sync package
eval ("{$pkg['custom_php_resync_config_command']}");
}
#function called via jquery, no need to continue after save changes.
// function called via jquery, no need to continue after save changes.
exit;
}
if ($_REQUEST['act'] == "del") {
@ -129,7 +129,7 @@ if ($_REQUEST['act'] == "del") {
if ($a_pkg[$_REQUEST['id']]) {
unset($a_pkg[$_REQUEST['id']]);
write_config();
write_config(gettext("Package configuration item deleted from package settings page."));
if ($pkg['custom_delete_php_command'] != "") {
if ($pkg['custom_php_command_before_form'] != "") {
eval($pkg['custom_php_command_before_form']);

View File

@ -37,26 +37,31 @@ $a_checkipservice = &$config['checkipservices']['checkipservice'];
$dirty = false;
if ($_POST['act'] == "del") {
unset($a_checkipservice[$_POST['id']]);
$wc_msg = gettext('Deleted a check IP service.');
$dirty = true;
} else if ($_POST['act'] == "toggle") {
if ($a_checkipservice[$_POST['id']]) {
if (isset($a_checkipservice[$_POST['id']]['enable'])) {
unset($a_checkipservice[$_POST['id']]['enable']);
$wc_msg = gettext('Disabled a check IP service.');
} else {
$a_checkipservice[$_POST['id']]['enable'] = true;
$wc_msg = gettext('Enabled a check IP service.');
}
$dirty = true;
} else if ($_POST['id'] == count($a_checkipservice)) {
if (isset($config['checkipservices']['disable_factory_default'])) {
unset($config['checkipservices']['disable_factory_default']);
$wc_msg = gettext('Enabled the default check IP service.');
} else {
$config['checkipservices']['disable_factory_default'] = true;
$wc_msg = gettext('Disabled the default check IP service.');
}
$dirty = true;
}
}
if ($dirty) {
write_config();
write_config($wc_msg);
header("Location: services_checkip.php");
exit;

View File

@ -160,7 +160,7 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) {
unset($config['syslog']['remoteserver3']);
}
write_config();
write_config(gettext("Changed system logging options."));
$changes_applied = true;
$retval = 0;

View File

@ -348,7 +348,7 @@ if ($_POST) {
$config['system']['bogons']['interval'] = $_POST['bogonsinterval'];
}
write_config();
write_config(gettext("Changed Advanced Firewall/NAT settings."));
// Kill filterdns when value changes, filter_configure() will restart it
if (($old_aliasesresolveinterval != $config['system']['aliasesresolveinterval']) &&

View File

@ -200,7 +200,7 @@ if($_POST['save']) {
$a_routes = $a_routes_new;
}
if (write_config()) {
if (write_config(gettext("Saved static routes configuration."))) {
mark_subsystem_dirty('staticroutes');
}
header("Location: system_routes.php");

View File

@ -209,7 +209,7 @@ if ($_POST['save']) {
mark_subsystem_dirty('staticroutes');
write_config();
write_config(gettext("Saved static route configuration."));
header("Location: system_routes.php");
exit;

View File

@ -96,7 +96,7 @@ if ($_POST) {
unset($config['system']['gitsync']['dryrun']);
}
write_config();
write_config(gettext("Saved system update settings."));
$savemsg = gettext("Changes have been saved successfully");
}

View File

@ -116,7 +116,7 @@ if ($_POST && !$input_errors) {
eval($pkg['step'][$stepid]['stepsubmitphpaction']);
}
if (!$input_errors) {
write_config();
write_config(gettext("Configuration changed via the pfSense wizard subsystem."));
}
$stepid++;