Merge pull request #426 from mkoch227/kb-fallback-to-old-attachments-folder
Fallback to ticket attachments folder for legacy KB attachments
This commit is contained in:
commit
222a964d38
@ -126,9 +126,14 @@ if (isset($_GET['kb_att'])) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Perhaps the file has been deleted?
|
// 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)) {
|
if (!file_exists($realpath)) {
|
||||||
hesk_error($hesklang['attdel']);
|
hesk_error($hesklang['attdel']);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Update the download count
|
// Update the download count
|
||||||
if (isset($_GET['kb_att'])) {
|
if (isset($_GET['kb_att'])) {
|
||||||
@ -162,4 +167,3 @@ if ($file['size'] > $chunksize) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
exit();
|
exit();
|
||||||
?>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user