[freeside-commits] freeside/FS/FS part_export.pm, 1.108, 1.108.2.1 part_svc.pm, 1.42, 1.42.2.1

Mark Wells mark at wavetail.420.am
Thu Oct 27 23:44:54 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv11945/FS/FS

Modified Files:
      Tag: FREESIDE_2_3_BRANCH
	part_export.pm part_svc.pm 
Log Message:
run exports in weight order, #14924

Index: part_svc.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_svc.pm,v
retrieving revision 1.42
retrieving revision 1.42.2.1
diff -u -w -d -r1.42 -r1.42.2.1
--- part_svc.pm	29 Jun 2011 05:16:55 -0000	1.42
+++ part_svc.pm	28 Oct 2011 06:44:52 -0000	1.42.2.1
@@ -434,6 +434,7 @@
   my $self = shift;
   my %search;
   $search{'exporttype'} = shift if @_;
+  sort { $a->weight <=> $b->weight }
   map { qsearchs('part_export', { 'exportnum' => $_->exportnum, %search } ) }
     qsearch('export_svc', { 'svcpart' => $self->svcpart } );
 }

Index: part_export.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_export.pm,v
retrieving revision 1.108
retrieving revision 1.108.2.1
diff -u -w -d -r1.108 -r1.108.2.1
--- part_export.pm	1 Jul 2011 06:54:02 -0000	1.108
+++ part_export.pm	28 Oct 2011 06:44:52 -0000	1.108.2.1
@@ -401,6 +401,18 @@
 
 =cut
 
+=item weight
+
+Returns the 'weight' element from the export's %info hash, or 0 if there is 
+no weight defined.
+
+=cut
+
+sub weight {
+  my $self = shift;
+  export_info()->{$self->exporttype}->{'weight'} || 0;
+}
+
 =back
 
 =head1 SUBROUTINES



More information about the freeside-commits mailing list