projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1d22636
)
eliminate warnings on upgrade: "(Odd number of elements in anonymous hash | Use of...
author
ivan
<ivan>
Tue, 13 May 2008 21:20:08 +0000
(21:20 +0000)
committer
ivan
<ivan>
Tue, 13 May 2008 21:20:08 +0000
(21:20 +0000)
FS/FS/part_pkg.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg.pm
b/FS/FS/part_pkg.pm
index
fd43e61
..
c3e76d5
100644
(file)
--- a/
FS/FS/part_pkg.pm
+++ b/
FS/FS/part_pkg.pm
@@
-254,14
+254,17
@@
sub delete {
Replaces OLD_RECORD with this one in the database. If there is an error,
returns the error, otherwise returns false.
Replaces OLD_RECORD with this one in the database. If there is an error,
returns the error, otherwise returns false.
-Currently available options are: I<pkg_svc>
and I<primary_svc
>
+Currently available options are: I<pkg_svc>
, I<primary_svc> and I<options
>
If I<pkg_svc> is set to a hashref with svcparts as keys and quantities as
If I<pkg_svc> is set to a hashref with svcparts as keys and quantities as
-values, the appropriate FS::pkg_svc records will be replace.
+values, the appropriate FS::pkg_svc records will be replace
d
.
If I<primary_svc> is set to the svcpart of the primary service, the appropriate
FS::pkg_svc record will be updated.
If I<primary_svc> is set to the svcpart of the primary service, the appropriate
FS::pkg_svc record will be updated.
+If I<options> is set to a hashref, the appropriate FS::part_pkg_option records
+will be replaced.
+
=cut
sub replace {
=cut
sub replace {
@@
-276,6
+279,8
@@
sub replace {
? shift
: { @_ };
? shift
: { @_ };
+ $options->{options} = {} unless defined($options->{options});
+
warn "FS::part_pkg::replace called on $new to replace $old with options".
join(', ', map "$_ => ". $options->{$_}, keys %$options)
if $DEBUG;
warn "FS::part_pkg::replace called on $new to replace $old with options".
join(', ', map "$_ => ". $options->{$_}, keys %$options)
if $DEBUG;