From 2feeb560d12000cc2fd3a3454caee8a30d1fcef2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Wed, 24 Jun 2015 21:25:24 +0200 Subject: [PATCH] pass $settings->_initialDocumentStatus to addContent() --- op/op.UpdateDocument.php | 2 +- op/op.UpdateDocument2.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/op/op.UpdateDocument.php b/op/op.UpdateDocument.php index b04b47f2f..e58bcf6d6 100644 --- a/op/op.UpdateDocument.php +++ b/op/op.UpdateDocument.php @@ -243,7 +243,7 @@ if ($_FILES['userfile']['error'] == 0) { $attributes = array(); } - $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, $settings->_initialDocumentStatus); if (is_bool($contentResult) && !$contentResult) { UI::exitError(getMLText("document_title", array("documentname" => $document->getName())),getMLText("error_occured")); } diff --git a/op/op.UpdateDocument2.php b/op/op.UpdateDocument2.php index f6f9b6eec..1dc2d702e 100644 --- a/op/op.UpdateDocument2.php +++ b/op/op.UpdateDocument2.php @@ -154,7 +154,7 @@ if( move_uploaded_file( $source_file_path, $target_file_path ) ) { } - $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers); + $contentResult=$document->addContent($comment, $user, $userfiletmp, basename($userfilename), $fileType, $userfiletype, $reviewers, $approvers, $version=0, null, null, $settings->_initialDocumentStatus); unlink($userfiletmp); if (is_bool($contentResult) && !$contentResult) { echo getMLText("error_occured");