Code: Select all
// Only allow an upload if they're in the initial or final copyediting
if ($copyeditStage == 'initial' && ($copyeditorSubmission->getDateNotified() == null || $copyeditorSubmission->getDateCompleted() != null)) return;
else if ($copyeditorSubmission->getDateFinalNotified() == null || $copyeditorSubmission->getDateFinalCompleted() != null) return;
Is anything missing in else if condition, like
?$copyeditStage == 'final' &&
I think there is a bug here, because the copyeditor is allowed to upload a file, but the file can not be saved because the else if condition is true, so the return statement is executed.