View | Details | Raw Unified | Return to bug 6696 | Differences between
and this patch

Collapse All | Expand All

(-)a/classes/issue/form/IssueForm.inc.php (-1 / +2 lines)
 Lines 353-359   class IssueForm extends Form { Link Here 
353
		if ($publicFileManager->uploadedFileExists('coverPage')) {
353
		if ($publicFileManager->uploadedFileExists('coverPage')) {
354
			$journal = Request::getJournal();
354
			$journal = Request::getJournal();
355
			$originalFileName = $publicFileManager->getUploadedFileName('coverPage');
355
			$originalFileName = $publicFileManager->getUploadedFileName('coverPage');
356
			$newFileName = 'cover_issue_' . $issueId . '_' . $this->getFormLocale() . '.' . $publicFileManager->getExtension($originalFileName);
356
			$type = $publicFileManager->getUploadedFileType('coverPage');
357
			$newFileName = 'cover_issue_' . $issueId . '_' . $this->getFormLocale() . $publicFileManager->getImageExtension($type);
357
			$publicFileManager->uploadJournalFile($journal->getId(), 'coverPage', $newFileName);
358
			$publicFileManager->uploadJournalFile($journal->getId(), 'coverPage', $newFileName);
358
			$issue->setOriginalFileName($publicFileManager->truncateFileName($originalFileName, 127), $this->getFormLocale());
359
			$issue->setOriginalFileName($publicFileManager->truncateFileName($originalFileName, 127), $this->getFormLocale());
359
			$issue->setFileName($newFileName, $this->getFormLocale());
360
			$issue->setFileName($newFileName, $this->getFormLocale());
(-)a/classes/submission/form/MetadataForm.inc.php (-1 / +2 lines)
 Lines 306-312   class MetadataForm extends Form { Link Here 
306
		if ($publicFileManager->uploadedFileExists(COVER_PAGE_IMAGE_NAME)) {
306
		if ($publicFileManager->uploadedFileExists(COVER_PAGE_IMAGE_NAME)) {
307
			$journal = Request::getJournal();
307
			$journal = Request::getJournal();
308
			$originalFileName = $publicFileManager->getUploadedFileName(COVER_PAGE_IMAGE_NAME);
308
			$originalFileName = $publicFileManager->getUploadedFileName(COVER_PAGE_IMAGE_NAME);
309
			$newFileName = 'cover_article_' . $this->article->getId() . '_' . $this->getFormLocale() . '.' . $publicFileManager->getExtension($originalFileName);
309
			$type = $publicFileManager->getUploadedFileType(COVER_PAGE_IMAGE_NAME);
310
			$newFileName = 'cover_article_' . $this->article->getId() . '_' . $this->getFormLocale() . $publicFileManager->getImageExtension($type);
310
			$publicFileManager->uploadJournalFile($journal->getId(), COVER_PAGE_IMAGE_NAME, $newFileName);
311
			$publicFileManager->uploadJournalFile($journal->getId(), COVER_PAGE_IMAGE_NAME, $newFileName);
311
			$article->setOriginalFileName($publicFileManager->truncateFileName($originalFileName, 127), $this->getFormLocale());
312
			$article->setOriginalFileName($publicFileManager->truncateFileName($originalFileName, 127), $this->getFormLocale());
312
			$article->setFileName($newFileName, $this->getFormLocale());
313
			$article->setFileName($newFileName, $this->getFormLocale());

Return to bug 6696