[freeside-commits] branch master updated. e1e2c5a12697fc16078f46d1e59358de5684ee16

Ivan ivan at 420.am
Sun Nov 13 09:22:02 PST 2016


The branch, master has been updated
       via  e1e2c5a12697fc16078f46d1e59358de5684ee16 (commit)
      from  41cfbe060c6c3d816a6e369259a587e50639e94d (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 e1e2c5a12697fc16078f46d1e59358de5684ee16
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Nov 13 09:21:59 2016 -0800

    don't link to deleted attachments if there aren't any

diff --git a/httemplate/view/cust_main/notes.html b/httemplate/view/cust_main/notes.html
index 6250200..c02af38 100755
--- a/httemplate/view/cust_main/notes.html
+++ b/httemplate/view/cust_main/notes.html
@@ -30,7 +30,13 @@
 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
            ($view ? ";show=$view" : '') . '#notes' 
            %>"><I>(<% mt('Show active attachments') |h %>)</I></A>
-%   } elsif($curuser->access_right('View deleted attachments')) {
+%   } elsif ( $curuser->access_right('View deleted attachments')
+%               && FS::Record->scalar_sql(
+%                    'SELECT 1 FROM cust_attachment WHERE custnum = ? '.
+%                      ' AND disabled IS NOT NULL AND disabled > 0 LIMIT 1',
+%                    $custnum )
+%           )
+%   {
 <A HREF="<% $p.'view/cust_main.cgi?custnum=' . $cust_main->custnum .
            ($view ? ";show=$view" : '') . ';show_deleted=1#notes'
            %>"><I>(<% mt('Show deleted attachments') |h %>)</I></A>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/view/cust_main/notes.html |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list