set sequence according to default position in configuration

This commit is contained in:
Uwe Steinmann 2018-02-07 09:52:23 +01:00
parent e5b215936a
commit 5b19253131

View File

@ -654,7 +654,11 @@ switch($command) {
$controller->setParam('userfilename', $userfilename);
$controller->setParam('filetype', $fileType);
$controller->setParam('userfiletype', $userfiletype);
$controller->setParam('sequence', 0);
$minmax = $folder->getDocumentsMinMax();
if($settings->_defaultDocPosition == 'start')
$controller->setParam('sequence', $minmax['min'] - 1);
else
$controller->setParam('sequence', $minmax['max'] + 1);
$controller->setParam('reviewers', $reviewers);
$controller->setParam('approvers', $approvers);
$controller->setParam('reqversion', 1);