From: Ivan Kohler Date: Thu, 11 Jan 2018 00:41:27 +0000 (-0800) Subject: fix direct use of customer_view_emails pref, RT#78617 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=18c201ad378d85e4a60206e33d3f257af2598b21 fix direct use of customer_view_emails pref, RT#78617 --- diff --git a/httemplate/view/cust_main/notes/email.html b/httemplate/view/cust_main/notes/email.html index 41c5b8ad4..9e217e4f0 100644 --- a/httemplate/view/cust_main/notes/email.html +++ b/httemplate/view/cust_main/notes/email.html @@ -61,7 +61,10 @@ my $cust_main = $opt{'cust_main'} my $custnum = $cust_main->custnum; my $where = "WHERE cust_msg.custnum = $custnum"; -my $maxrecords = $curuser->option('customer_view_emails') || 10; +my $maxrecords = 10; +if ( $curuser->option('customer_view_emails') =~ /^\s*(\d+)\s*$/ ) { + $maxrecords = $1; +} my $order_by = '_date DESC';