[freeside-commits] branch master updated. 9f17681a11d2e20f5baa7acf19873daf33058aa9
Carl J. Adams-Collier
cjac at 420.am
Tue Sep 9 18:07:54 PDT 2014
The branch, master has been updated
via 9f17681a11d2e20f5baa7acf19873daf33058aa9 (commit)
from 845a6ea956c4725b800a82cc1b2ae68cd485a015 (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 9f17681a11d2e20f5baa7acf19873daf33058aa9
Author: C.J. Adams-Collier <cjac at colliertech.org>
Date: Tue Sep 9 17:42:19 2014 -0700
altered FS::UI::Web::cust_sort_fields() and cust_sql_fields() so that ->param('cust_fields') argument is no longer required
when the parameter is not passed, the initial value previously passed to cust_header() is used
if @cust_fields is empty, cust_header() is called with no arguments
diff --git a/FS/FS/UI/Web.pm b/FS/FS/UI/Web.pm
index 5fcd522..6161706 100644
--- a/FS/FS/UI/Web.pm
+++ b/FS/FS/UI/Web.pm
@@ -324,7 +324,7 @@ sub cust_header {
}
sub cust_sort_fields {
- cust_header(@_);
+ cust_header(@_) if( @_ or !@cust_fields );
#inefficientish, but tiny lists and only run once per page
map { $_ eq 'custnum' ? 'custnum' : '' } @cust_fields;
@@ -346,7 +346,7 @@ sub cust_sql_fields {
my @fields = qw( last first company );
# push @fields, map "ship_$_", @fields;
- cust_header(@_);
+ cust_header(@_) if( @_ or !@cust_fields );
#inefficientish, but tiny lists and only run once per page
my @location_fields;
@@ -486,6 +486,7 @@ element.
sub cust_fields_subs {
my $unlinked_warn = 0;
+
return map {
my $f = $_;
if ( $unlinked_warn++ ) {
diff --git a/httemplate/search/elements/cust_main_dayranges.html b/httemplate/search/elements/cust_main_dayranges.html
index ddde23a..5dbece8 100644
--- a/httemplate/search/elements/cust_main_dayranges.html
+++ b/httemplate/search/elements/cust_main_dayranges.html
@@ -187,7 +187,7 @@ my $sql_query = {
'cust_main.custnum',
$range_cols,
$packages_cols,
- FS::UI::Web::cust_sql_fields($cgi->param('cust_fields')),
+ FS::UI::Web::cust_sql_fields(),
'payby',
),
'extra_sql' => $where,
-----------------------------------------------------------------------
Summary of changes:
FS/FS/UI/Web.pm | 5 +++--
httemplate/search/elements/cust_main_dayranges.html | 2 +-
2 files changed, 4 insertions(+), 3 deletions(-)
More information about the freeside-commits
mailing list