#405 Fallback to ticket attachments folder for legacy KB attachments

This commit is contained in:
Mike Koch 2015-11-15 12:05:36 -05:00
parent d6956c9e06
commit 430087e533

View File

@ -126,9 +126,14 @@ if (isset($_GET['kb_att'])) {
}
// Perhaps the file has been deleted?
if (!file_exists($realpath)) {
// Let's try the ticket attachment folder. Legacy KB attachments are not automatically migrated.
$realpath = $hesk_settings['attach_dir'] . '/' . $file['saved_name'];
if (!file_exists($realpath)) {
hesk_error($hesklang['attdel']);
}
}
// Update the download count
if (isset($_GET['kb_att'])) {
@ -162,4 +167,3 @@ if ($file['size'] > $chunksize) {
}
exit();
?>