summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-10 00:41:53 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2007-03-10 00:41:53 +0000
commitb768adb1ef785a3ecef9d77098efa8d6fe65a0ef (patch)
treebfe9ffc645e53b8914c3639934f46cd8b4961d04
parenta2bfc9671736d88f3e4603eeb0a97d2425cb3584 (diff)
Fixed LedgerSMB::Merge again
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@875 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB.pm16
1 files changed, 14 insertions, 2 deletions
diff --git a/LedgerSMB.pm b/LedgerSMB.pm
index d547ea51..e751a229 100755
--- a/LedgerSMB.pm
+++ b/LedgerSMB.pm
@@ -3117,8 +3117,20 @@ sub audittrail {
}
sub merge {
- my ($self, $src) = @_;
- for $arg (keys %$src){
+ my ($self, $src) = @_;
+ for my $arg ($self, $src){
+ shift;
+ }
+ my @keys;
+ if (scalar @keys){
+ @keys = @_;
+ print "Keys: ". scalar @keys . "\n";
+ }
+ else {
+ @keys = keys %{$src};
+ print "Keys: ". scalar @keys . "\n";
+ }
+ for my $arg (keys %$src){
$self->{$arg} = $src->{$arg};
}
}