Commit 003af661 authored by Dainis Abols's avatar Dainis Abols
Browse files

4.2.1

parent 86c8f8be
......@@ -78,7 +78,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
*
* @var string
*/
protected $targetPath = '_migrated/lu_nas/';
protected $targetPath = 'lu_nas/';
/**
* @return string Unique identifier of this updater
......@@ -102,8 +102,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
public function getDescription(): string
{
return 'This update wizard goes through all files that are referenced in the'
. ' backend_layout.icon field and adds the files to the FAL File Index.'
. ' It also moves the files from uploads/ to the fileadmin/_migrated/ path.';
. ' backend_layout.icon field and adds the files to the FAL File Index.';
}
/**
......@@ -214,15 +213,9 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
foreach ($fieldItems as $item) {
$fileUid = null;
$sourcePath = Environment::getPublicPath() . '/' . $this->sourcePath . $item;
$targetDirectory = Environment::getPublicPath() . '/' . $fileadminDirectory . $this->targetPath;
$targetPath = $targetDirectory . PathUtility::basenameDuringBootstrap($item);
// maybe the file was already moved, so check if the original file still exists
if (file_exists($sourcePath)) {
if (!is_dir($targetDirectory)) {
GeneralUtility::mkdir_deep($targetDirectory);
}
// see if the file already exists in the storage
$fileSha1 = sha1_file($sourcePath);
......@@ -242,9 +235,6 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
// the file exists, the file does not have to be moved again
if (is_array($existingFileRecord)) {
$fileUid = $existingFileRecord['uid'];
} else {
// just move the file (no duplicate)
rename($sourcePath, $targetPath);
}
}
......
{
"name": "luitd/lu-nas",
"version": "4.2.0",
"version": "4.2.1",
"description": "Latvijas Universitātes Normatīvo Aktu sistēmas TYPO3 spraudnis",
"type": "typo3-cms-extension",
"keywords": [
......
......@@ -7,9 +7,9 @@ $EM_CONF[$_EXTKEY] = [
'author' => 'Dainis Abols',
'author_company' => 'University of Latvia',
'author_email' => 'dainis.abols@lu.lv',
'state' => 'alpha',
'state' => 'stable',
'clearCacheOnLoad' => true,
'version' => '4.2.0',
'version' => '4.2.1',
'constraints' => [
'depends' => [
'typo3' => '9.5.0-10.9.99',
......
......@@ -4,7 +4,7 @@ TYPO3 Extension for Regulations (NAS)
## Version
4.2.0
4.2.1
## Dependecies
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment