diff options
Diffstat (limited to 'src/usr/local')
-rw-r--r-- | src/usr/local/www/pkg_edit.php | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 0e9a2dc..71c18e3 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -690,7 +690,11 @@ foreach ($pkg['fields']['field'] as $pkga) { // Create an input element. The format is slightly different depending on whether we are composing a group, // section, or advanced section. This is true for every element type case "input": - if($grouping) { + if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) { + $value = base64_decode($value); + } + + if ($grouping) { $group->add(new Form_Input( $pkga['fieldname'], $pkga['fielddescr'], @@ -718,8 +722,12 @@ foreach ($pkg['fields']['field'] as $pkga) { break; case "password": + if (($pkga['encoding'] == 'base64') && !$get_from_post && !empty($value)) { + $value = base64_decode($value); + } + // Create a password element - if($grouping) { + if ($grouping) { $group->add(new Form_Input( $pkga['fieldname'], $pkga['fielddescr'], @@ -1325,6 +1333,11 @@ foreach ($pkg['fields']['field'] as $pkga) { } $type = $rowhelper['type']; + if ($type == "input" || $type == "password" || $type == "textarea" ) { + if (($rowhelper['encoding'] == 'base64') && !$get_from_post && !empty($value)) { + $value = base64_decode($value); + } + } $fieldname = $rowhelper['fieldname']; if ($rowhelper['size']) { |