#405 Fallback to ticket attachments folder for legacy KB attachments
This commit is contained in:
parent
d6956c9e06
commit
430087e533
@ -127,7 +127,12 @@ if (isset($_GET['kb_att'])) {
|
|||||||
|
|
||||||
// Perhaps the file has been deleted?
|
// Perhaps the file has been deleted?
|
||||||
if (!file_exists($realpath)) {
|
if (!file_exists($realpath)) {
|
||||||
hesk_error($hesklang['attdel']);
|
// 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
|
// Update the download count
|
||||||
@ -161,5 +166,4 @@ if ($file['size'] > $chunksize) {
|
|||||||
readfile($realpath);
|
readfile($realpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
?>
|
|
Loading…
x
Reference in New Issue
Block a user