summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2005-08-27 01:43:38 +0000
committerScott Ullrich <sullrich@pfsense.org>2005-08-27 01:43:38 +0000
commitd2ac25995b1d163324961ae167c745cc0c8060a7 (patch)
tree4d25aa09e83b410b4634cb875ea362a5a881f4f1 /usr
parentaef27b8c6e69ebb814dff6ecd085eaaf2c15515f (diff)
downloadpfsense-d2ac25995b1d163324961ae167c745cc0c8060a7.zip
pfsense-d2ac25995b1d163324961ae167c745cc0c8060a7.tar.gz
When multiple and size is defined for a interface, treat it as a php array.
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/pkg_edit.php14
1 files changed, 12 insertions, 2 deletions
diff --git a/usr/local/www/pkg_edit.php b/usr/local/www/pkg_edit.php
index 996f244..17f2939 100755
--- a/usr/local/www/pkg_edit.php
+++ b/usr/local/www/pkg_edit.php
@@ -125,8 +125,8 @@ if ($_POST) {
} else {
if($firstfield == $rowhelperfield['fieldname']) $rows++;
}
- $comd = "\$value = \$_POST['" . $rowhelperfield['fieldname'] . $x . "'];";
- //echo($comd . "<br>");
+ $comd = "\$value = \$_POST['" . $rowhelperfield['fieldname'] . $x . "'];";
+ echo($comd . "<br>");
eval($comd);
if($value <> "") {
$comd = "\$pkgarr['row'][" . $x . "]['" . $rowhelperfield['fieldname'] . "'] = \"" . $value . "\";";
@@ -139,6 +139,16 @@ if ($_POST) {
// simply loop through all field names looking for posted
// values matching the fieldnames. if found, save to package
// configuration area.
+ if(is_array( $_POST[$fields['fieldname']] )) {
+ $pkgarr[$fields['fieldname']]=array();
+ foreach($_POST[$fields['fieldname']] as $v) {
+ echo "IS ARRAY";
+ $pkgarr[$fields['fieldname']][] = $v;
+ echo("\$pkgarr[\$fields['fieldname']][] = \$v; <br>");
+ eval($comd);
+ }
+ continue;
+ }
$fieldname = $fields['fieldname'];
$fieldvalue = $_POST[$fieldname];
$pkgarr[$fieldname] = $fieldvalue;
OpenPOWER on IntegriCloud