Просмотр исходного кода

Regression introduced after 2.3.0-beta [r4217]: broken links to donwload / display blobs.

git-svn-id: http://svn.code.sf.net/p/itop/code/trunk@4319 a333f486-631f-4898-b8df-5754b55c2be0
dflaven 8 лет назад
Родитель
Сommit
5c690372f4
2 измененных файлов с 3 добавлено и 3 удалено
  1. 2 2
      core/ormdocument.class.inc.php
  2. 1 1
      pages/ajax.document.php

+ 2 - 2
core/ormdocument.class.inc.php

@@ -115,7 +115,7 @@ class ormDocument
 	 */	 	 	
 	 */	 	 	
 	public function GetDownloadLink($sClass, $Id, $sAttCode)
 	public function GetDownloadLink($sClass, $Id, $sAttCode)
 	{
 	{
-		return "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php?operation=download_document&class=$sClass&id=$Id&field=$sAttCode\">".htmlentities($this->GetFileName(), ENT_QUOTES, 'UTF-8')."</a>\n";
+		return "<a href=\"".utils::GetAbsoluteUrlAppRoot()."pages/ajax.document.php?operation=download_document&class=$sClass&id=$Id&field=$sAttCode\">".htmlentities($this->GetFileName(), ENT_QUOTES, 'UTF-8')."</a>\n";
 	}
 	}
 
 
 	/**
 	/**
@@ -176,7 +176,7 @@ class ormDocument
 			{
 			{
 				$oPage->TrashUnexpectedOutput();
 				$oPage->TrashUnexpectedOutput();
 				$oPage->SetContentType($oDocument->GetMimeType());
 				$oPage->SetContentType($oDocument->GetMimeType());
-				//$oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName());
+				$oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName());
 				$oPage->add($oDocument->GetData());
 				$oPage->add($oDocument->GetData());
 			}
 			}
 		}
 		}

+ 1 - 1
pages/ajax.document.php

@@ -83,7 +83,7 @@ try
 			$iCacheSec = 31556926; // One year ahead: an inline image cannot change
 			$iCacheSec = 31556926; // One year ahead: an inline image cannot change
 			if (!empty($id) && !empty($sSecret))
 			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("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("Cache-Control: no-transform,public,max-age=$iCacheSec,s-maxage=$iCacheSec");
 				$oPage->add_header("Pragma: cache"); // Reset the value set .... where ?
 				$oPage->add_header("Pragma: cache"); // Reset the value set .... where ?