pass initial status from settings to updateDocument

This commit is contained in:
Uwe Steinmann 2017-06-14 14:04:38 +02:00
parent 652e7a82af
commit b59b6a0cfb
2 changed files with 3 additions and 1 deletions

View File

@ -53,11 +53,12 @@ class SeedDMS_Controller_UpdateDocument extends SeedDMS_Controller_Common {
$attributes = $this->getParam('attributes');
$workflow = $this->getParam('workflow');
$maxsizeforfulltext = $this->getParam('maxsizeforfulltext');
$initialdocumentstatus = $this->getParam('initialdocumentstatus');
$result = $this->callHook('updateDocument');
if($result === null) {
$filesize = SeedDMS_Core_File::fileSize($userfiletmp);
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $filetype, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow);
$contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $filetype, $userfiletype, $reviewers, $approvers, $version=0, $attributes, $workflow, $initialdocumentstatus);
if ($this->hasParam('expires')) {
if($document->setExpires($this->getParam('expires'))) {

View File

@ -317,6 +317,7 @@ default:
$controller->setParam('approvers', $approvers);
$controller->setParam('attributes', $attributes);
$controller->setParam('workflow', $workflow);
$controller->setParam('initialdocumentstatus', $settings->_initialDocumentStatus);
if(!$content = $controller->run()) {
UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText($controller->getErrorMsg()));