Commit d9582107b460bcf03bb5552e8a4591166b121f2f

Authored by nbm
1 parent 976128ba

Add temporaryFile and freeTemporaryFile for whenever one needs a

(read-only) physical file to work on.


git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@3915 c91229c3-7414-0410-bfa2-8a42b809f60b
lib/storage/ondiskpathstoragemanager.inc.php
@@ -73,6 +73,15 @@ class KTOnDiskPathStorageManager extends KTStorageManager { @@ -73,6 +73,15 @@ class KTOnDiskPathStorageManager extends KTStorageManager {
73 $sStoragePath = sprintf("%s/%s", Document::_generateFolderPath($oDocument->getFolderID()), $oDocument->getFileName()); 73 $sStoragePath = sprintf("%s/%s", Document::_generateFolderPath($oDocument->getFolderID()), $oDocument->getFileName());
74 return $sStoragePath; 74 return $sStoragePath;
75 } 75 }
  76 +
  77 + function temporaryFile(&$oDocument) {
  78 + $oConfig =& KTConfig::getSingleton();
  79 + return sprintf("%s/%s", $oConfig->get('urls/documentRoot'), $this->getPath($oDocument));
  80 + }
  81 +
  82 + function freeTemporaryFile($sPath) {
  83 + return;
  84 + }
76 85
77 function download($oDocument) { 86 function download($oDocument) {
78 //get the path to the document on the server 87 //get the path to the document on the server