mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-13 21:21:27 +00:00
allow pass the object with the document content
This commit is contained in:
parent
853d111738
commit
585c81bb66
|
@ -28,6 +28,7 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
|
|
||||||
switch($type) {
|
switch($type) {
|
||||||
case "version":
|
case "version":
|
||||||
|
if(empty($this->params['content'])) {
|
||||||
$version = $this->params['version'];
|
$version = $this->params['version'];
|
||||||
$document = $this->params['document'];
|
$document = $this->params['document'];
|
||||||
if($version < 1) {
|
if($version < 1) {
|
||||||
|
@ -47,6 +48,9 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
* expect the content in the controller
|
* expect the content in the controller
|
||||||
*/
|
*/
|
||||||
$this->params['content'] = $content;
|
$this->params['content'] = $content;
|
||||||
|
} else {
|
||||||
|
$content = $this->params['content'];
|
||||||
|
}
|
||||||
if(null === $this->callHook('version')) {
|
if(null === $this->callHook('version')) {
|
||||||
if(file_exists($dms->contentDir . $content->getPath())) {
|
if(file_exists($dms->contentDir . $content->getPath())) {
|
||||||
header("Content-Transfer-Encoding: binary");
|
header("Content-Transfer-Encoding: binary");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user