summaryrefslogtreecommitdiffstats
path: root/src/usr/local/www/pkg.php
diff options
context:
space:
mode:
authordoktornotor <notordoktor@gmail.com>2017-03-09 15:20:18 +0100
committerGitHub <noreply@github.com>2017-03-09 15:20:18 +0100
commit0baf52bbf047ff60528b7da194384d73cf00c38b (patch)
tree93ad8d8b5585705343bae632a359ea7a7169e826 /src/usr/local/www/pkg.php
parent5a433494ae6c9e59dd4735d6d3fcf25394ca0c33 (diff)
downloadpfsense-0baf52bbf047ff60528b7da194384d73cf00c38b.zip
pfsense-0baf52bbf047ff60528b7da194384d73cf00c38b.tar.gz
Add reason to write_config() calls
Replace shell-style comments while here.
Diffstat (limited to 'src/usr/local/www/pkg.php')
-rw-r--r--src/usr/local/www/pkg.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php
index 55f5559..305f28b 100644
--- a/src/usr/local/www/pkg.php
+++ b/src/usr/local/www/pkg.php
@@ -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']);
OpenPOWER on IntegriCloud