Page 1 of 1
how to disable attachments in resolved/closed tickets
Posted: Wed Oct 10, 2012 1:20 am
by Lurking
Script URL:
Version of script: 2.4.1
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:
Write your message below:
Hi,
Is it possible to disable clickable attachments within messages on tickets that have been closed/resolved without actually deleting the entire message itself? I do not want to make attachments available after a ticket is closed by the customer or after the scheduled "autoclose" period has taken effect. Thanks, Larry
Re: how to disable attachments in resolved/closed tickets
Posted: Wed Oct 10, 2012 6:12 pm
by Klemen
The easiest thing to do would be to:
1. open ticket.php in an editor
2. find line
3. below this line add
Code: Select all
if ($ticket['status'] == 3)
{
$hesk_settings['attachments']['use'] = 0;
}
4. save, upload and test
This should hide attachments from closed tickets. If you prefer to just disable links but still list them, this would require more work.
Re: how to disable attachments in resolved/closed tickets
Posted: Fri Oct 19, 2012 3:21 am
by Lurking
Hi Klemen,
Thanks again for your help!

Re: how to disable attachments in resolved/closed tickets
Posted: Sat Dec 08, 2012 4:30 pm
by Lurking
Klemen,
Just wanted to let you know this feature works with SOME files, but the attachment link still shows and is still "clickable".
Example:
Someone clicks on a .PDF file in a "closed" ticket, the link will start to open, but then a message appears after a moment saying the file is either "not supported" or is "corrupt" (same with a .wav file).
If a .JPG image is selected, an error popes up saying the file is "empty". VERY COOL, this works for me!
BUT, you can still open/download .RTF and .ZIP files??? I want to prevent this in closed tickets.
Why would this only work for SOME files and not others?
Why do the the links/files still show after your MOD? The reason did not bring this up before was because I did not test the .ZIP or .PDF attachments. These are the attachments I really need blocked. The .JPG's are not as important to me. Thanks, Larry
Re: how to disable attachments in resolved/closed tickets
Posted: Sun Dec 09, 2012 9:44 am
by Klemen
This should *hide* all links on the *customer* side, links will still show from the staff panel.
The errors you get are not related to this modification, but rather to server not processing file downloads properly. HESK downloaded files should be forced as a download and not opened directly in browser - if this happens you have an error somewhere breaking HTTP headers.
Try uploading original HESK files to the server:
- /language/ folder
- download_attachment.php
- inc/common.inc.php
- inc/database.inc.php
- inc/admin_functions.inc.php
Re: how to disable attachments in resolved/closed tickets
Posted: Sun Dec 09, 2012 3:55 pm
by Lurking
Thanks, I was testing on my end. The links do not show as advertised. Sorry about that.
Re: how to disable attachments in resolved/closed tickets
Posted: Tue May 14, 2013 5:24 am
by laycomp
Works in Hesk Desk 2.4.2
Thanks, great solution!