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");