[freeside-commits] freeside/httemplate/search cust_pkg.cgi, 1.75, 1.76 477partVI_census.html, 1.7, 1.8

Ivan,,, ivan at wavetail.420.am
Thu Aug 18 14:27:49 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv29935/httemplate/search

Modified Files:
	cust_pkg.cgi 477partVI_census.html 
Log Message:
fix 477 reporting w/multiple classnums, RT#13922

Index: 477partVI_census.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/477partVI_census.html,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -d -r1.7 -r1.8
--- 477partVI_census.html	18 Aug 2011 01:23:02 -0000	1.7
+++ 477partVI_census.html	18 Aug 2011 21:27:47 -0000	1.8
@@ -1,6 +1,6 @@
 <% include( 'elements/search.html',
                   'html_init'     => $html_init,
-                  'html_foot'     => $html_foot,,
+                  'html_foot'     => $html_foot,
                   'name'          => 'regions',
                   'query'         => [ @sql_query ],
                   'count_query'   =>  $count_query,
@@ -32,10 +32,10 @@
                     sub { my $row = shift; 
                           my $state = substr($row->censustract, 0, 2);
                           $state_hash{$state}++;
-                          substr($row->censustract, 2, 3) || 'None'
+                          substr($row->censustract, 2, 3) || 'None';
                         },
                     sub { my $row = shift;
-                          substr($row->censustract, 5) || 'None'
+                          substr($row->censustract, 5) || 'None';
                         },
                     'upload',
                     'download',
@@ -81,7 +81,8 @@
 for ( qw(agentnum magic) ) {
   $search_hash{$_} = $cgi->param($_) if $cgi->param($_);
 }
-$search_hash{'classnum'} = [ $cgi->param('classnum') ];
+$search_hash{'classnum'} = [ $cgi->param('classnum') ]
+  if grep { $_ eq 'classnum' } $cgi->param;
 
 my @column_option = grep { /^\d+$/ } $cgi->param('part1_column_option')
   if $cgi->param('part1_column_option');

Index: cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/cust_pkg.cgi,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -w -d -r1.75 -r1.76
--- cust_pkg.cgi	18 Aug 2011 01:15:41 -0000	1.75
+++ cust_pkg.cgi	18 Aug 2011 21:27:47 -0000	1.76
@@ -150,14 +150,15 @@
 }
 
 #arrays
-for (qw( pkgpart classnum )) {
-  $search_hash{$_} = [ $cgi->param($_) ];
+for my $param (qw( pkgpart classnum )) {
+  $search_hash{$param} = [ $cgi->param($param) ];
+    if grep { $_ eq $param } $cgi->param;
 }
 
 #scalars that need to be passed if empty
 for my $param (qw(censustract censustract2 )) {
   $search_hash{$param} = $cgi->param($param) || ''
-    if ( grep { /$param/ } $cgi->param );
+    if grep { $_ eq $param } $cgi->param;
 }
 
 my @report_option = $cgi->param('report_option')



More information about the freeside-commits mailing list