[interchange] * Allow extra_fields to set and retrieve scratch values.
Mike Heins
interchange-cvs at icdevgroup.org
Thu Apr 4 17:49:50 UTC 2013
commit df36e3266f14a8c4296b9a20868bb094fa75ac5d
Author: Mike Heins <heins at icdevgroup.com>
Date: Thu Apr 4 13:49:14 2013 -0400
* Allow extra_fields to set and retrieve scratch values.
lib/Vend/UserDB.pm | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/lib/Vend/UserDB.pm b/lib/Vend/UserDB.pm
index 7e6c776..1ab5e69 100644
--- a/lib/Vend/UserDB.pm
+++ b/lib/Vend/UserDB.pm
@@ -883,6 +883,12 @@ sub get_values {
my $hash = get_option_hash($row->{$field});
if($hash and $hash = $hash->{$loc} and ref($hash) eq 'HASH') {
for(@s) {
+ if($scratch{$_} ) {
+ $::Scratch->{$_} = $hash->{$_};
+ }
+ else {
+ $::Values->{$_} = $hash->{$_};
+ }
$::Values->{$_} = $hash->{$_};
}
}
@@ -1008,7 +1014,7 @@ sub set_values {
my $subhash = $hash->{$loc} ||= {};
for(@s) {
- $subhash->{$_} = $valref->{$_};
+ $subhash->{$_} = $scratch{$_} ? $scratchref->{$_} : $valref->{$_};
}
push @extra, $field;
More information about the interchange-cvs
mailing list