From c147062aaa792fb74d423c25d68762122ba5fd99 Mon Sep 17 00:00:00 2001 From: Denis Flaven Date: Wed, 10 Aug 2016 15:54:04 +0000 Subject: [PATCH] Regression introduced after 2.3.0-beta [r4217]: broken links to donwload / display blobs. SVN:trunk[4319] --- core/ormdocument.class.inc.php | 4 ++-- pages/ajax.document.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ormdocument.class.inc.php b/core/ormdocument.class.inc.php index f33c00ae3..174a70bcd 100644 --- a/core/ormdocument.class.inc.php +++ b/core/ormdocument.class.inc.php @@ -115,7 +115,7 @@ class ormDocument */ public function GetDownloadLink($sClass, $Id, $sAttCode) { - return "".htmlentities($this->GetFileName(), ENT_QUOTES, 'UTF-8')."\n"; + return "".htmlentities($this->GetFileName(), ENT_QUOTES, 'UTF-8')."\n"; } /** @@ -176,7 +176,7 @@ class ormDocument { $oPage->TrashUnexpectedOutput(); $oPage->SetContentType($oDocument->GetMimeType()); - //$oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName()); + $oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName()); $oPage->add($oDocument->GetData()); } } diff --git a/pages/ajax.document.php b/pages/ajax.document.php index 64358aac1..1dfa0752e 100644 --- a/pages/ajax.document.php +++ b/pages/ajax.document.php @@ -83,7 +83,7 @@ try $iCacheSec = 31556926; // One year ahead: an inline image cannot change if (!empty($id) && !empty($sSecret)) { - ormDocument::DownloadDocument($oPage, 'InlineImage', $id, 'contents', 'attachment', 'secret', $sSecret); + ormDocument::DownloadDocument($oPage, 'InlineImage', $id, 'contents', 'inline', 'secret', $sSecret); $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"); $oPage->add_header("Pragma: cache"); // Reset the value set .... where ?