[freeside-commits] branch FREESIDE_3_BRANCH updated. e0996ad60e8a9d4d050fcdb722121027e7e107c0
Ivan
ivan at 420.am
Fri Jan 16 18:41:27 PST 2015
The branch, FREESIDE_3_BRANCH has been updated
via e0996ad60e8a9d4d050fcdb722121027e7e107c0 (commit)
from f81671daf8cc0ecc573c245cd1c8285d93867190 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit e0996ad60e8a9d4d050fcdb722121027e7e107c0
Author: Joshua Goodman <jgoodman1990 at gmail.com>
Date: Fri Jan 16 00:25:37 2015 +0000
Change $_category_table to be a hash which maps packages to category tables. A bug was found where "part_svc_category" was returned when FS::part_pkg->insert() was called.
diff --git a/FS/FS/class_Common.pm b/FS/FS/class_Common.pm
index 5ee8208..b065154 100644
--- a/FS/FS/class_Common.pm
+++ b/FS/FS/class_Common.pm
@@ -122,14 +122,15 @@ sub _target_table {
sub _target_column { 'classnum'; }
-use vars qw( $_category_table );
+use vars qw( %_category_table );
sub _category_table {
- return $_category_table if $_category_table;
my $self = shift;
- $_category_table = $self->table;
- $_category_table =~ s/class/category/ # s/_class$/_category/
- or die "can't determine an automatic category table for $_category_table";
- $_category_table;
+ return $_category_table{ ref $self } ||= do {
+ my $category_table = $self->table;
+ $category_table =~ s/class/category/ # s/_class$/_category/
+ or die "can't determine an automatic category table for $category_table";
+ $category_table;
+ }
}
=head1 BUGS
-----------------------------------------------------------------------
Summary of changes:
FS/FS/class_Common.pm | 13 +++++++------
1 file changed, 7 insertions(+), 6 deletions(-)
More information about the freeside-commits
mailing list