Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix problem with creation of submission file revision in review rounds #7231

Closed
wants to merge 3 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions controllers/wizard/fileUpload/PKPFileUploadWizardHandler.inc.php
Expand Up @@ -71,7 +71,7 @@ function authorize($request, &$args, $roleAssignments) {
// we don't need to validate in another places.
$fileStage = (int) $request->getUserVar('fileStage');
if ($fileStage) {
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
$fileStages = $submissionFileDao->getAllFileStages();
if (!in_array($fileStage, $fileStages)) {
return false;
Expand Down Expand Up @@ -423,10 +423,13 @@ protected function _attachEntities($submissionFile) {
case SUBMISSION_FILE_REVIEW_REVISION:
// Add the uploaded review file to the review round.
$reviewRound = $this->getReviewRound();
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */
$submissionFileDao->assignRevisionToReviewRound($submissionFile->getFileId(), $submissionFile->getRevision(), $reviewRound);

if ($submissionFile->getFileStage() == SUBMISSION_FILE_REVIEW_REVISION) {
if (!is_null($reviewRound)) {
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */
$submissionFileDao->assignRevisionToReviewRound($submissionFile->getFileId(), $submissionFile->getRevision(), $reviewRound);
}

if ($submissionFile->getFileStage() == SUBMISSION_FILE_REVIEW_REVISION && !is_null($reviewRound)) {
// Get a list of author user IDs
$authorUserIds = array();
$stageAssignmentDao = DAORegistry::getDAO('StageAssignmentDAO'); /* @var $stageAssignmentDao StageAssignmentDAO */
Expand Down