[freeside-commits] branch FREESIDE_4_BRANCH updated. 60f03007647bdd937354846c83f33475abe1f150

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


The branch, FREESIDE_4_BRANCH has been updated
       via  60f03007647bdd937354846c83f33475abe1f150 (commit)
      from  4a9bed3848f790e9113e14ee3cc16fcd54a151f2 (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 60f03007647bdd937354846c83f33475abe1f150
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Nov 13 09:22:02 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