Downloading Attachments While in Maintenance Mode

Helpdesk for my helpdesk software

Moderator: mkoch227

Post Reply
mkoch227
Posts: 666
Joined: Wed Jul 04, 2012 3:37 pm

Downloading Attachments While in Maintenance Mode

Post by mkoch227 »

The following bug report came to Mods for HESK:
When I switch on maintenance mode the attachments in the tickets are resulting in dead links or sql errors for the admins.
I took a quick look at download_attachment.php, and there is this code block for checking if maintenance mode is enabled:

Code: Select all

// Are we in maintenance mode? (check customers only)
if (empty($SESSION['id'])) {
    hesk_check_maintenance();
}
This appears to be an issue since sessions are stored in the $_SESSION superglobal, and not $SESSION. Therefore, it appears that HESK is always checking if it is in maintenance mode, even if the user downloading the attachment is not a customer.
Mike, Lead Developer of Image HESK: A surprisingly simple, user-friendly and FREE help desk software with integrated knowledgebase.
Klemen
Site Admin
Posts: 10145
Joined: Fri Feb 11, 2005 4:04 pm

Re: Downloading Attachments While in Maintenance Mode

Post by Klemen »

Thanks, will fix this in the next minor update (in the next days, just need to finish testing HESK on final PHP 7).
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Post Reply