Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERM-93 Fix to view archive for file import #686

Merged
merged 1 commit into from
Jul 15, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions usage/uploadComplete.php
Original file line number Diff line number Diff line change
Expand Up @@ -888,16 +888,16 @@ function sumCounts($counts, $year) {
include 'templates/header.php';

//Log import in database
if ($importLogID != ""){
if ($fromSushi){
$importLog = new ImportLog(new NamedArguments(array('primaryKey' => $importLogID)));
$importLog->fileName = $importLog->fileName;
$importLog->archiveFileURL = $importLog->fileName;
$importLog->details = $importLog->details . "\n" . $rownumber . _(" rows processed.") . $logSummary;
$archvieFileName = $importLog->fileName;
}else{
// copy the uploaded file to the archive
$archvieFileName = 'archive/' . $fileInfo['filename'] . '_' .strtotime('now') . '.' . $fileInfo['extension'];
copy($file, BASE_DIR . $archvieFileName);
$archvieFileName = 'archive/' . $fileInfo['filename'] . '_' .strtotime('now') . '.txt';
copy(BASE_DIR . 'counterstore/' . $fileInfo['filename'], BASE_DIR . $archvieFileName);
$importLog = new ImportLog();
$importLog->importLogID = '';
$importLog->fileName = $fileInfo['basename'];
Expand Down