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

Collapse All | Expand All

(-)a/classes/submission/form/ArticleGalleyForm.inc.php (-6 / +8 lines)
 Lines 135-140   class ArticleGalleyForm extends Form { Link Here 
135
135
136
		$fileName = isset($fileName) ? $fileName : 'galleyFile';
136
		$fileName = isset($fileName) ? $fileName : 'galleyFile';
137
		$journal =& Request::getJournal();
137
		$journal =& Request::getJournal();
138
		$fileId = null;
138
139
139
		if (isset($this->galley)) {
140
		if (isset($this->galley)) {
140
			$galley =& $this->galley;
141
			$galley =& $this->galley;
 Lines 143-148   class ArticleGalleyForm extends Form { Link Here 
143
			if ($articleFileManager->uploadedFileExists($fileName)) {
144
			if ($articleFileManager->uploadedFileExists($fileName)) {
144
				if($galley->getFileId()) {
145
				if($galley->getFileId()) {
145
					$articleFileManager->uploadPublicFile($fileName, $galley->getFileId());
146
					$articleFileManager->uploadPublicFile($fileName, $galley->getFileId());
147
					$fileId = $galley->getFileId();
146
				} else {
148
				} else {
147
					$fileId = $articleFileManager->uploadPublicFile($fileName);
149
					$fileId = $articleFileManager->uploadPublicFile($fileName);
148
					$galley->setFileId($fileId);
150
					$galley->setFileId($fileId);
 Lines 179-190   class ArticleGalleyForm extends Form { Link Here 
179
			if ($articleFileManager->uploadedFileExists($fileName)) {
181
			if ($articleFileManager->uploadedFileExists($fileName)) {
180
				$fileType = $articleFileManager->getUploadedFileType($fileName);
182
				$fileType = $articleFileManager->getUploadedFileType($fileName);
181
				$fileId = $articleFileManager->uploadPublicFile($fileName);
183
				$fileId = $articleFileManager->uploadPublicFile($fileName);
182
183
				// Update file search index
184
				import('classes.search.ArticleSearchIndex');
185
				ArticleSearchIndex::updateFileIndex($this->articleId, ARTICLE_SEARCH_GALLEY_FILE, $fileId);
186
			} else {
187
				$fileId = 0;
188
			}
184
			}
189
185
190
			if (isset($fileType) && strstr($fileType, 'html')) {
186
			if (isset($fileType) && strstr($fileType, 'html')) {
 Lines 242-247   class ArticleGalleyForm extends Form { Link Here 
242
			$this->galleyId = $galley->getId();
238
			$this->galleyId = $galley->getId();
243
		}
239
		}
244
240
241
		if ($fileId) {
242
			// Update file search index
243
			import('classes.search.ArticleSearchIndex');
244
			ArticleSearchIndex::updateFileIndex($this->articleId, ARTICLE_SEARCH_GALLEY_FILE, $fileId);
245
		}
246
245
		return $this->galleyId;
247
		return $this->galleyId;
246
	}
248
	}
247
249

Return to bug 6765