mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-03 07:28:57 +02:00
Added a helper function to get an icon stored as an ormDocument: ormDocument::GetDownloadURL -reintegrated from trunk
SVN:2.0.2[3192]
This commit is contained in:
@@ -770,9 +770,15 @@ try
|
||||
case 'download_document':
|
||||
$id = utils::ReadParam('id', '');
|
||||
$sField = utils::ReadParam('field', '');
|
||||
$iCacheSec = (int) utils::ReadParam('cache', 0);
|
||||
if (!empty($sClass) && !empty($id) && !empty($sField))
|
||||
{
|
||||
DownloadDocument($oPage, $sClass, $id, $sField, 'attachment');
|
||||
if ($iCacheSec > 0)
|
||||
{
|
||||
$oPage->add_header("Expires: "); // Reset the value set in ajax_page
|
||||
$oPage->add_header("Cache-Control: no-transform,public,max-age=$iCacheSec,s-maxage=$iCacheSec");
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user