summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2004-12-23 22:00:02 +0000
committerScott Ullrich <sullrich@pfsense.org>2004-12-23 22:00:02 +0000
commite1e7a4256f454544e4fb718f7d207caa35aec852 (patch)
treee5e1417b599f740721ebd832756f3a1cffd597a9 /usr
parent5f883afd0b64029c06a1a8cdc44684377552fbbf (diff)
downloadpfsense-e1e7a4256f454544e4fb718f7d207caa35aec852.zip
pfsense-e1e7a4256f454544e4fb718f7d207caa35aec852.tar.gz
Add stepsubmitbeforesave tag which will process text before saving.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/wizard.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/local/www/wizard.php b/usr/local/www/wizard.php
index 553f817..c67f13b 100755
--- a/usr/local/www/wizard.php
+++ b/usr/local/www/wizard.php
@@ -56,6 +56,10 @@ $title = $pkg['step'][$stepid]['title'];
$description = $pkg['step'][$stepid]['description'];
$totalsteps = $pkg['totalsteps'];
+if($pkg['step'][$stepid]['stepsubmitbeforesave']) {
+ eval($pkg['step'][$stepid]['stepsubmitbeforesave']);
+}
+
if ($_POST) {
foreach ($pkg['step'][$stepid]['fields']['field'] as $field) {
if($field['bindstofield'] <> "" and $field['type'] <> "submit") {
@@ -69,9 +73,9 @@ if ($_POST) {
if($field['bindstofield'])
update_config_field( $field['bindstofield'], $_POST[$fieldname], $unset_fields, $arraynum);
}
- if($pkg['step'][$stepid]['stepsubmitphpaction']) {
// run custom php code embedded in xml config.
- eval($pkg['step'][$stepid]['stepsubmitphpaction']);
+ if($pkg['step'][$stepid]['stepsubmitphpaction']) {
+ eval($pkg['step'][$stepid]['stepsubmitphpaction']);
}
write_config();
}
OpenPOWER on IntegriCloud