Preserve inline image floating in ticket thread
Ensure the email doesn't already exist before creating it.
Fix ambiguous `duedate` if specified as custom field
Fix canned append in non-HTML mode
mysqli: Numbers with leading zeros are strings
Restrict access to closed tickets based on staff's access control.

Background: osTicket allows access to assigned open tickets (both personal
and team assignments) regardless of the assigned department or group. This
is necessary to allow staff to work on tickets in an otherwise restricted
department.

When a staff member closes a ticket, they're credited (ticket.staff_id is
set to staff's id) for the purpose of showing who closed the ticket.
osTicket mistakenly allowed continued access to closed tickets even when the
staff doesn't have access to the ticket based on departmental access.
Merge pull request #612 from greezybacon/issue/thread-image-float

Preserve inline image floating in ticket thread

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #621 from greezybacon/issue/393

Fix canned append in non-HTML mode

Reviewed-By: Peter Rotich <peter@osticket.com>
Allow manager to be set even when a department has no members

This is necessary to allow for creative department based access control and
alerts.
Merge pull request #618 from protich/feature/dept-mananger

Allow manager to be set even when a department has no members

Reviewed-By: Jared Hancock <jared@osticket.com>
Merge pull request #620 from greezybacon/issue/cdata-field-name-clobber

Fix ambiguous `due date` if specified as custom field

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #622 from greezybacon/issue/156

mysqli: Numbers with leading zeros are strings

Reviewed-By: Peter Rotich <peter@osticket.com>
html: Drop xml processing instructions from email
Merge pull request #628 from greezybacon/issue/xml-pi-drop

html: Drop xml processing instructions from email

Reviewed-By: Peter Rotich <peter@osticket.com>
Merge pull request #617 from protich/issue/613

Ensure the email doesn't already exist before creating it.

Reviewed-By: Jared Hancock <jared@osticket.com>
Merge pull request #623 from protich/issue/ticket-access

Restrict access to closed tickets based on staff's access control.

Reviewed-By: Jared Hancock <jared@osticket.com>
Merge remote branch 'upstream/develop' into develop-next

Conflicts:
	include/class.user.php
	include/staff/tickets.inc.php