diff options
-rwxr-xr-x | httemplate/edit/cust_main.cgi | 3 | ||||
-rwxr-xr-x | httemplate/edit/part_pkg.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/process/access_user.html | 2 | ||||
-rw-r--r-- | httemplate/edit/process/elements/ApplicationCommon.html | 4 | ||||
-rw-r--r-- | httemplate/edit/process/elements/svc_Common.html | 2 | ||||
-rw-r--r-- | httemplate/edit/process/part_event.html | 8 | ||||
-rw-r--r-- | httemplate/edit/process/sched_item.html | 4 | ||||
-rwxr-xr-x | httemplate/edit/process/svc_acct.cgi | 4 | ||||
-rw-r--r-- | httemplate/edit/quick-charge.html | 6 | ||||
-rw-r--r-- | httemplate/elements/select-time-from_to.html | 4 | ||||
-rw-r--r-- | httemplate/graph/signupdate.cgi | 8 | ||||
-rw-r--r-- | httemplate/misc/email-customer-statement.html | 6 | ||||
-rwxr-xr-x | httemplate/misc/process/link.cgi | 2 | ||||
-rw-r--r-- | httemplate/misc/process/payment.cgi | 4 | ||||
-rw-r--r-- | httemplate/misc/process/timeworked.html | 2 | ||||
-rwxr-xr-x | httemplate/misc/unhold_pkg.html | 2 | ||||
-rw-r--r-- | httemplate/search/cust_msg.html | 8 | ||||
-rw-r--r-- | httemplate/search/log.html | 24 | ||||
-rwxr-xr-x | httemplate/view/cust_bill-barcode.cgi | 2 |
19 files changed, 50 insertions, 47 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi index 4399c4348..d84679d4e 100755 --- a/httemplate/edit/cust_main.cgi +++ b/httemplate/edit/cust_main.cgi @@ -259,7 +259,8 @@ if ( $cgi->param('error') ) { unless $curuser->access_right($custnum ? 'Edit customer' : 'New customer'); @invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') ); - $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid'); + $cust_main->setfield( 'paid' => scalar($cgi->param('paid')) ) + if $cgi->param('paid'); $ss = $cust_main->ss; # don't mask an entered value on errors $stateid = $cust_main->stateid; # don't mask an entered value on errors $payinfo = $cust_main->payinfo; # don't mask an entered value on errors diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 84e74f639..641366b65 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -559,7 +559,7 @@ my $clone_callback = sub { if ( $cgi->param('pkgnum') ) { - my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $cgi->param('pkgnum') } ); + my $cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => scalar($cgi->param('pkgnum')) } ); $object->agentnum( $cust_pkg->cust_main->agentnum ); $opt->{action} = 'Custom'; diff --git a/httemplate/edit/process/access_user.html b/httemplate/edit/process/access_user.html index 3a5d95198..c884a5208 100644 --- a/httemplate/edit/process/access_user.html +++ b/httemplate/edit/process/access_user.html @@ -27,7 +27,7 @@ if ( FS::Conf->new->exists('disable_acl_changes') ) { sub precheck_callback { my $cgi = shift; - my $o = FS::access_user->new({username => $cgi->param('username')}); + my $o = FS::access_user->new({username => scalar($cgi->param('username'))}); if( $o->is_system_user and !$cgi->param('usernum') ) { $cgi->param('username',''); return "username '".$o->username."' reserved for system account." diff --git a/httemplate/edit/process/elements/ApplicationCommon.html b/httemplate/edit/process/elements/ApplicationCommon.html index a73b1bccd..633392990 100644 --- a/httemplate/edit/process/elements/ApplicationCommon.html +++ b/httemplate/edit/process/elements/ApplicationCommon.html @@ -69,9 +69,9 @@ my $dbh = dbh; my $new; # $new = new FS::cust_refund ( { # 'reason' => 'Refunding payment', #enter reason in UI -# 'refund' => $cgi->param('amount'), +# 'refund' => scalar($cgi->param('amount')), # 'payby' => 'BILL', -# #'_date' => $cgi->param('_date'), +# #'_date' => scalar($cgi->param('_date')), # 'payinfo' => 'Cash', #enter payinfo in UI # 'paynum' => $paynum, # } ); diff --git a/httemplate/edit/process/elements/svc_Common.html b/httemplate/edit/process/elements/svc_Common.html index ca336a126..504ded031 100644 --- a/httemplate/edit/process/elements/svc_Common.html +++ b/httemplate/edit/process/elements/svc_Common.html @@ -26,7 +26,7 @@ my $args_callback = sub { or die "svcpart required"; if ( $part_svc->has_router ) { my $router = FS::router->new({ - map { $_ => $cgi->param("router_$_") } + map { $_ => scalar($cgi->param("router_$_")) } qw( routernum routername blocknum ) }); if ($router->blocknum and length($router->routername) == 0) { diff --git a/httemplate/edit/process/part_event.html b/httemplate/edit/process/part_event.html index 0293af886..6c6249cc1 100644 --- a/httemplate/edit/process/part_event.html +++ b/httemplate/edit/process/part_event.html @@ -81,7 +81,7 @@ 'precheck_callback' => sub { my $cgi = shift; my $action = $cgi->param('action') or return; - my %actionfields = map { $_ =~ /^$action\.(.*)/; $1 => $cgi->param($_) } + my %actionfields = map { $_ =~ /^$action\.(.*)/; $1 => scalar($cgi->param($_)) } grep { /^$action\./ } $cgi->param; if ( exists($actionfields{'reasonnum'}) and length($actionfields{'reasonnum'}) == 0 ) { @@ -99,8 +99,10 @@ next unless $cgi->param($1) eq 'balance_age'; my $errstr = FS::part_event::Condition::balance_age-> - check_options( { age => $cgi->param($param), - age_units => $cgi->param("${param}_units") } ); + check_options( { age => scalar($cgi->param($param)), + age_units => scalar($cgi->param("${param}_units")), + } + ); return $errstr if $errstr; } diff --git a/httemplate/edit/process/sched_item.html b/httemplate/edit/process/sched_item.html index 7731a35b9..335f81360 100644 --- a/httemplate/edit/process/sched_item.html +++ b/httemplate/edit/process/sched_item.html @@ -21,8 +21,8 @@ foreach my $wday (0..6) { push @sched_avail, new FS::sched_avail { 'itemnum' => $itemnum, 'wday' => $wday, - 'stime' => $cgi->param("sched_avail$wday".'_stime'), - 'etime' => $cgi->param("sched_avail$wday".'_etime'), + 'stime' => scalar($cgi->param("sched_avail$wday".'_stime')), + 'etime' => scalar($cgi->param("sched_avail$wday".'_etime')), }; } } diff --git a/httemplate/edit/process/svc_acct.cgi b/httemplate/edit/process/svc_acct.cgi index d81eaecb9..12e84cc47 100755 --- a/httemplate/edit/process/svc_acct.cgi +++ b/httemplate/edit/process/svc_acct.cgi @@ -64,7 +64,7 @@ my $error = ''; my $part_svc = $svcnum ? $old->part_svc : qsearchs( 'part_svc', - { 'svcpart' => $cgi->param('svcpart') } + { 'svcpart' => scalar($cgi->param('svcpart')) } ); # google captcha auth @@ -117,7 +117,7 @@ if ( ! $error ) { if ( $part_svc->has_router ) { my $router = FS::router->new({ - map { $_ => $cgi->param("router_$_") } + map { $_ => scalar($cgi->param("router_$_")) } qw( routernum routername blocknum ) }); if (length($router->routername) == 0) { diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 379aaaea4..2f70bd790 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -306,11 +306,11 @@ function bill_now_changed (what) { <TD><INPUT TYPE="checkbox" NAME="setuptax" VALUE="Y" <% $cgi->param('setuptax') ? 'CHECKED' : '' %>></TD> </TR> -<& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass') &> +<& /elements/tr-select-taxclass.html, 'curr_value' => scalar($cgi->param('taxclass')) &> -<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum') &> +<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => scalar($cgi->param('taxproductnum')) &> -<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') &> +<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => scalar($cgi->param('tax_override')) &> % } # if !$cust_pkg diff --git a/httemplate/elements/select-time-from_to.html b/httemplate/elements/select-time-from_to.html index 9d49b7ab8..e41731345 100644 --- a/httemplate/elements/select-time-from_to.html +++ b/httemplate/elements/select-time-from_to.html @@ -2,14 +2,14 @@ %opt, 'field' => $opt{'prefix'}. 'stime', 'selected_default' => 480, #8am... configure? - 'curr_value' => $cgi->param($opt{'prefix'}.'stime'), + 'curr_value' => scalar($cgi->param($opt{'prefix'}.'stime')), &> - <& select-time.html, %opt, 'field' => $opt{'prefix'}. 'etime', 'selected_default' => 1080, #6pm.. configure? - 'curr_value' => $cgi->param($opt{'prefix'}.'etime'), + 'curr_value' => scalar($cgi->param($opt{'prefix'}.'etime')), &> <%init> my %opt = @_; diff --git a/httemplate/graph/signupdate.cgi b/httemplate/graph/signupdate.cgi index 8261257f3..823ddb89f 100644 --- a/httemplate/graph/signupdate.cgi +++ b/httemplate/graph/signupdate.cgi @@ -34,13 +34,13 @@ $where{'agentnum'} = $agentnum if $agentnum; $where{'usernum'} = $usernum if $usernum; my $sdate = DateTime->new( - year => $cgi->param('start_year'), - month => $cgi->param('start_month'), + year => scalar($cgi->param('start_year')), + month => scalar($cgi->param('start_month')), )->epoch(); my $edate = DateTime->new( - year => $cgi->param('end_year'), - month => $cgi->param('end_month') + year => scalar($cgi->param('end_year')), + month => scalar($cgi->param('end_month')), )->add( months => 1 )->epoch(); my $where = (%where ? ' AND ' : ' WHERE '); diff --git a/httemplate/misc/email-customer-statement.html b/httemplate/misc/email-customer-statement.html index c0ed88031..aa65b05db 100644 --- a/httemplate/misc/email-customer-statement.html +++ b/httemplate/misc/email-customer-statement.html @@ -28,9 +28,9 @@ my $alternate_form = sub { my $label = ucfirst($_); $label =~ s/_/ /; include('/elements/tr-input-date-field.html',{ - 'name' => $_, - 'value' => $cgi->param($_) || '', - 'label' => $label, + 'name' => $_, + 'value' => ( scalar($cgi->param($_)) || '' ), + 'label' => $label, 'noinit' => $noinit++ }); } diff --git a/httemplate/misc/process/link.cgi b/httemplate/misc/process/link.cgi index 77546f3f7..a3f9f3e32 100755 --- a/httemplate/misc/process/link.cgi +++ b/httemplate/misc/process/link.cgi @@ -30,7 +30,7 @@ unless ( $svcnum ) { my $svcdb = $part_svc->getfield('svcdb'); $cgi->param('link_field') =~ /^(\w+)$/; my $link_field = $1; - my %search = ( $link_field => $cgi->param('link_value') ); + my %search = ( $link_field => scalar($cgi->param('link_value')) ); if ( $cgi->param('link_field2') =~ /^(\w+)$/ ) { $search{$1} = $cgi->param('link_value2'); } diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index dcfcc0b85..8c12b4d3c 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -175,12 +175,12 @@ if ( $cgi->param('save') ) { if ( $payby eq 'CARD' ) { my $bill_location = FS::cust_location->new; - $bill_location->set( $_ => $cgi->param($_) ) + $bill_location->set( $_ => scalar($cgi->param($_)) ) foreach @{$payby2fields{$payby}}; $new->set('bill_location' => $bill_location); # will do nothing if the fields are all unchanged } else { - $new->set( $_ => $cgi->param($_) ) foreach @{$payby2fields{$payby}}; + $new->set( $_ => scalar($cgi->param($_)) ) foreach @{$payby2fields{$payby}}; } my $error = $new->replace($cust_main); diff --git a/httemplate/misc/process/timeworked.html b/httemplate/misc/process/timeworked.html index 01752e1b7..aaccf056e 100644 --- a/httemplate/misc/process/timeworked.html +++ b/httemplate/misc/process/timeworked.html @@ -18,7 +18,7 @@ foreach my $transaction ( map { /^transactionid(\d+)$/; $1; } grep /^transactionid\d+$/, $cgi->param ) { my $s = "multiplier${transaction}_"; - my %multipliers = map { /^$s(\d+)$/; $1 => $cgi->param("$s$1"); } + my %multipliers = map { /^$s(\d+)$/; $1 => scalar($cgi->param("$s$1")); } grep /^$s\d+$/, $cgi->param; my $msum = 0; foreach(values %multipliers) {$msum += $_}; diff --git a/httemplate/misc/unhold_pkg.html b/httemplate/misc/unhold_pkg.html index 0c110b4f9..d7044cf11 100755 --- a/httemplate/misc/unhold_pkg.html +++ b/httemplate/misc/unhold_pkg.html @@ -42,7 +42,7 @@ <label for="when_date"> <% emt('On this date:') %> </label> <& /elements/input-date-field.html, { name => 'start_date', - value => $cgi->param('start_date'), + value => scalar($cgi->param('start_date')), } &> </LI> diff --git a/httemplate/search/cust_msg.html b/httemplate/search/cust_msg.html index 8976925f7..2e1f75c81 100644 --- a/httemplate/search/cust_msg.html +++ b/httemplate/search/cust_msg.html @@ -124,17 +124,17 @@ my $html_init = qq!<FORM ACTION="$p/search/cust_msg.html" METHOD="GET"> <TABLE cellspacing="10">!. '<TR><TD>From '. include('/elements/input-date-field.html', - { 'name' => 'beginning', 'value' => $cgi->param('beginning') } + { 'name' => 'beginning', 'value' => scalar($cgi->param('beginning')) } ). '</TD><TD> To '. include('/elements/input-date-field.html', - { 'name' => 'ending', 'value' => ($cgi->param('ending') || ''), + { 'name' => 'ending', 'value' => (scalar($cgi->param('ending')) || ''), 'noinit' => 1, } ). '</TD><TD> Status '. include('/elements/select.html', 'field' => 'status', - 'curr_value' => $cgi->param('status') || '', + 'curr_value' => scalar($cgi->param('status')) || '', 'options' => [ '', 'failed', 'sent', ], 'labels' => { '' => '(any)', 'failed' => 'failed', @@ -143,7 +143,7 @@ include('/elements/select.html', '</TD><TD> Type '. include('/elements/select.html', 'field' => 'msgtype', - 'curr_value' => $cgi->param('msgtype') || '', + 'curr_value' => scalar($cgi->param('msgtype')) || '', 'options' => [ '', 'invoice', 'receipt', 'admin', 'report' ], 'labels' => { '' => '(any)', 'invoice' => 'Invoices', diff --git a/httemplate/search/log.html b/httemplate/search/log.html index d4fed54c9..592e77dc1 100644 --- a/httemplate/search/log.html +++ b/httemplate/search/log.html @@ -64,14 +64,14 @@ a:visited {text-decoration: none} <TR> <TD>From <& /elements/input-date-field.html, { - name => 'beginning', - value => $cgi->param('beginning'), + name => 'beginning', + value => scalar($cgi->param('beginning')), } &> </TD> <TD>To <& /elements/input-date-field.html, { - name => 'ending', - value => $cgi->param('ending') || '', + name => 'ending', + value => scalar($cgi->param('ending')) || '' ), noinit => 1, } &> </TD> @@ -79,17 +79,17 @@ a:visited {text-decoration: none} <TR> <TD>Level <& /elements/select.html, - field => 'min_level', - options => [ 0..7 ], - labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 }, - curr_value => $cgi->param('min_level'), + field => 'min_level', + options => [ 0..7 ], + labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 }, + curr_value => scalar($cgi->param('min_level')), &> to <& /elements/select.html, - field => 'max_level', - options => [ 0..7 ], - labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 }, - curr_value => $cgi->param('max_level'), + field => 'max_level', + options => [ 0..7 ], + labels => { map {$_ => $FS::Log::LEVELS[$_]} 0..7 }, + curr_value => scalar($cgi->param('max_level')), &> </TD> <TD> diff --git a/httemplate/view/cust_bill-barcode.cgi b/httemplate/view/cust_bill-barcode.cgi index dd8f8b814..b55c28541 100755 --- a/httemplate/view/cust_bill-barcode.cgi +++ b/httemplate/view/cust_bill-barcode.cgi @@ -8,7 +8,7 @@ my $conf = new FS::Conf; die 'invalid query' unless $cgi->param('invnum'); -my $cust_bill = qsearchs('cust_bill', { 'invnum' => $cgi->param('invnum') } ) +my $cust_bill = qsearchs('cust_bill', { 'invnum' => scalar($cgi->param('invnum')) } ) or die 'unknown invnum'; my $png = $cust_bill->invoice_barcode(0); |