@@ -107,7 +107,7 @@ |
||
107 | 107 | throw new NotFoundException($this->l10n->t('Could not add files to the Redis OCR processing queue.')); |
108 | 108 | } |
109 | 109 | } catch (Exception $e) { |
110 | - $this->fileUtil->execRemove($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf'); |
|
110 | + $this->fileUtil->execRemove($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf'); |
|
111 | 111 | $job->setStatus(OcrConstants::STATUS_FAILED); |
112 | 112 | $job->setErrorLog($e->getMessage()); |
113 | 113 | $this->mapper->update($job); |
@@ -156,7 +156,7 @@ discard block |
||
156 | 156 | foreach ($fileInfo as $fInfo) { |
157 | 157 | // Check Shared |
158 | 158 | $shared = $this->fileService->checkSharedWithInitiator($fInfo); |
159 | - if($shared && $replace) { |
|
159 | + if ($shared && $replace) { |
|
160 | 160 | throw new NotFoundException($this->l10n->t('Cannot replace shared files.')); |
161 | 161 | } |
162 | 162 | $target = $this->fileService->buildTarget($fInfo, $shared, $replace); |
@@ -274,11 +274,11 @@ discard block |
||
274 | 274 | $this->logger->debug('Check if files were processed by ocr and if so, put them to the right dirs.'); |
275 | 275 | $processed = $this->jobMapper->findAllProcessed($this->userId); |
276 | 276 | foreach ($processed as $job) { |
277 | - if ($this->fileUtil->fileExists($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf')) { |
|
277 | + if ($this->fileUtil->fileExists($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf')) { |
|
278 | 278 | // Save the tmp file with newname |
279 | 279 | $this->pullResult($job); |
280 | 280 | $this->jobMapper->delete($job); |
281 | - $this->fileUtil->execRemove($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf'); |
|
281 | + $this->fileUtil->execRemove($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf'); |
|
282 | 282 | } else { |
283 | 283 | $job->setStatus(OcrConstants::STATUS_FAILED); |
284 | 284 | $job->setErrorLog('Temp file does not exist.'); |
@@ -302,7 +302,7 @@ discard block |
||
302 | 302 | $failed = $this->jobMapper->findAllFailed($this->userId); |
303 | 303 | foreach ($failed as $job) { |
304 | 304 | // clean the tempfile |
305 | - $this->fileUtil->execRemove($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf'); |
|
305 | + $this->fileUtil->execRemove($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf'); |
|
306 | 306 | // set error displayed |
307 | 307 | $job->setErrorDisplayed(true); |
308 | 308 | $this->jobMapper->update($job); |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | if ($job->getReplace()) { |
327 | 327 | $this->view->unlink(str_replace($this->userId . '/files', '', $job->getSource())); |
328 | 328 | } |
329 | - $result = $this->view->file_put_contents($job->getTarget(), $this->fileUtil->getFileContents($this->tempM->getTempBaseDir().'/'.$job->getTempFile().'.pdf')); |
|
329 | + $result = $this->view->file_put_contents($job->getTarget(), $this->fileUtil->getFileContents($this->tempM->getTempBaseDir() . '/' . $job->getTempFile() . '.pdf')); |
|
330 | 330 | if (!$result) { |
331 | 331 | throw new NotFoundException($this->l10n->t('OCR could not put processed file to the right target folder. If you selected the replace option, you can restore the file by using the trash bin.')); |
332 | 332 | } |