mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-09 13:06:14 +00:00
Merge branch 'seeddms-5.1.x' into seeddms-6.0.x
This commit is contained in:
commit
a2fbb7cca0
|
@ -176,7 +176,15 @@ class SeedDMS_Controller_Download extends SeedDMS_Controller_Common {
|
||||||
|
|
||||||
$version = $this->params['version'];
|
$version = $this->params['version'];
|
||||||
$document = $this->params['document'];
|
$document = $this->params['document'];
|
||||||
$content = $document->getContentByVersion($version);
|
if($version < 1) {
|
||||||
|
$content = $this->callHook('documentLatestContent', $document);
|
||||||
|
if($content === null)
|
||||||
|
$content = $document->getLatestContent();
|
||||||
|
} else {
|
||||||
|
$content = $this->callHook('documentContent', $document, $version);
|
||||||
|
if($content === null)
|
||||||
|
$content = $document->getContentByVersion($version);
|
||||||
|
}
|
||||||
if (!is_object($content)) {
|
if (!is_object($content)) {
|
||||||
$this->errormsg = 'invalid_version';
|
$this->errormsg = 'invalid_version';
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -35,7 +35,6 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
$name = $this->getParam('name');
|
|
||||||
$comment = $this->getParam('comment');
|
$comment = $this->getParam('comment');
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
|
|
|
@ -100,7 +100,7 @@ $(document).ready(function() {
|
||||||
$options[] = array('', '');
|
$options[] = array('', '');
|
||||||
if ($overallStatus["status"] == S_OBSOLETE)
|
if ($overallStatus["status"] == S_OBSOLETE)
|
||||||
$options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED));
|
$options[] = array(S_RELEASED, getOverallStatusText(S_RELEASED));
|
||||||
if ($overallStatus["status"] == S_RELEASED)
|
if ($overallStatus["status"] != S_OBSOLETE)
|
||||||
$options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE));
|
$options[] = array(S_OBSOLETE, getOverallStatusText(S_OBSOLETE));
|
||||||
if ($overallStatus["status"] != S_DRAFT)
|
if ($overallStatus["status"] != S_DRAFT)
|
||||||
$options[] = array(S_DRAFT, getOverallStatusText(S_DRAFT));
|
$options[] = array(S_DRAFT, getOverallStatusText(S_DRAFT));
|
||||||
|
|
|
@ -431,6 +431,9 @@ class SeedDMS_View_ViewDocument extends SeedDMS_Bootstrap_Style {
|
||||||
|
|
||||||
function show() { /* {{{ */
|
function show() { /* {{{ */
|
||||||
parent::show();
|
parent::show();
|
||||||
|
|
||||||
|
$this->callHook('preViewDocument');
|
||||||
|
|
||||||
$dms = $this->params['dms'];
|
$dms = $this->params['dms'];
|
||||||
$user = $this->params['user'];
|
$user = $this->params['user'];
|
||||||
$folder = $this->params['folder'];
|
$folder = $this->params['folder'];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user