Skip to content
This repository has been archived by the owner on Sep 25, 2023. It is now read-only.

Commit

Permalink
*5843* Fixed supp file upload bug
Browse files Browse the repository at this point in the history
  • Loading branch information
asmecher committed Aug 31, 2010
1 parent 76283cf commit 0dd32d3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions pages/author/SubmitHandler.inc.php
Expand Up @@ -163,7 +163,7 @@ function saveSubmit($args) {

case 4:
if (Request::getUserVar('submitUploadSuppFile')) {
if ($suppFileId = SubmitHandler::submitUploadSuppFile()) {
if ($suppFileId = SubmitHandler::submitUploadSuppFile(array(), $request)) {
Request::redirect(null, null, null, 'submitSuppFile', $suppFileId, array('paperId' => $paperId));
} else {
$submitForm->addError('uploadSubmissionFile', Locale::translate('common.uploadFailed'));
Expand Down Expand Up @@ -230,8 +230,8 @@ function saveSubmit($args) {
/**
* Create new supplementary file with a uploaded file.
*/
function submitUploadSuppFile() {
$paperId = Request::getUserVar('paperId');
function submitUploadSuppFile($args, $request) {
$paperId = $request->getUserVar('paperId');
$this->validate($paperId, 4);
$paper =& $this->paper;
$this->setupTemplate(true);
Expand All @@ -245,7 +245,7 @@ function submitUploadSuppFile() {

import('classes.author.form.submit.AuthorSubmitSuppFileForm');
$submitForm = new AuthorSubmitSuppFileForm($paper);
$submitForm->setData('title', Locale::translate('common.untitled'));
$submitForm->setData('title', array($paper->getLocale() => Locale::translate('common.untitled')));
return $submitForm->execute();
}

Expand Down
2 changes: 1 addition & 1 deletion pages/trackDirector/SubmissionEditHandler.inc.php
Expand Up @@ -1486,7 +1486,7 @@ function uploadSuppFile($fileName = null, $round = null) {
import('classes.submission.form.SuppFileForm');

$suppFileForm = new SuppFileForm($submission);
$suppFileForm->setData('title', Locale::translate('common.untitled'));
$suppFileForm->setData('title', array($submission->getLocale() => Locale::translate('common.untitled')));
$suppFileId = $suppFileForm->execute($fileName);

Request::redirect(null, null, null, 'editSuppFile', array($paperId, $suppFileId));
Expand Down

0 comments on commit 0dd32d3

Please sign in to comment.