Skip to content

Commit

Permalink
pkp/pkp-lib#6724 Fix postgres-related issues and missing variable bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ewhanson committed Jan 20, 2022
1 parent 44831ca commit 85218ea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions classes/install/Upgrade.inc.php
Expand Up @@ -121,7 +121,7 @@ public function repairSuppFilesFilestage()
->leftJoin('submissions as s', 's.submission_id', '=', 'sf.submission_id')
->where('sf.file_stage', '=', SubmissionFile::SUBMISSION_FILE_SUBMISSION)
->where('sf.assoc_type', '=', ASSOC_TYPE_REPRESENTATION)
->where('sf.revision', '=', DB::raw('ssf.revision'))
->whereColumn('sf.revision', '=', 'ssf.revision')
->get();

foreach ($rows as $row) {
Expand All @@ -147,8 +147,8 @@ public function repairSuppFilesFilestage()
date('Ymd', strtotime($row->date_uploaded)),
strtolower_codesafe($fileManager->parseFileExtension($row->original_file_name))
);
$oldFileName = $submissionDir . '/' . $submissionFileRevision->_fileStageToPath($submissionFileRevision->getFileStage()) . '/' . $generatedOldFilename;
$newFileName = $submissionDir . '/' . $submissionFileRevision->_fileStageToPath($submissionFileRevision->getFileStage()) . '/' . $generatedNewFilename;
$oldFileName = $submissionDir . '/' . $this->_fileStageToPath($row->file_stage) . '/' . $generatedOldFilename;
$newFileName = $submissionDir . '/' . $this->_fileStageToPath($row->file_stage) . '/' . $generatedNewFilename;
if (!Services::get('file')->fs->rename($oldFileName, $newFileName)) {
error_log("Unable to move \"${oldFileName}\" to \"${newFileName}\".");
}
Expand Down
2 changes: 1 addition & 1 deletion lib/pkp

0 comments on commit 85218ea

Please sign in to comment.