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 ...@@ -78,7 +78,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
* *
* @var string * @var string
*/ */
protected $targetPath = '_migrated/lu_nas/'; protected $targetPath = 'lu_nas/';
/** /**
* @return string Unique identifier of this updater * @return string Unique identifier of this updater
...@@ -102,8 +102,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo ...@@ -102,8 +102,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
public function getDescription(): string public function getDescription(): string
{ {
return 'This update wizard goes through all files that are referenced in the' 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.' . ' 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.';
} }
/** /**
...@@ -214,15 +213,9 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo ...@@ -214,15 +213,9 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
foreach ($fieldItems as $item) { foreach ($fieldItems as $item) {
$fileUid = null; $fileUid = null;
$sourcePath = Environment::getPublicPath() . '/' . $this->sourcePath . $item; $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 // maybe the file was already moved, so check if the original file still exists
if (file_exists($sourcePath)) { if (file_exists($sourcePath)) {
if (!is_dir($targetDirectory)) {
GeneralUtility::mkdir_deep($targetDirectory);
}
// see if the file already exists in the storage // see if the file already exists in the storage
$fileSha1 = sha1_file($sourcePath); $fileSha1 = sha1_file($sourcePath);
...@@ -242,9 +235,6 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo ...@@ -242,9 +235,6 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
// the file exists, the file does not have to be moved again // the file exists, the file does not have to be moved again
if (is_array($existingFileRecord)) { if (is_array($existingFileRecord)) {
$fileUid = $existingFileRecord['uid']; $fileUid = $existingFileRecord['uid'];
} else {
// just move the file (no duplicate)
rename($sourcePath, $targetPath);
} }
} }
......
{ {
"name": "luitd/lu-nas", "name": "luitd/lu-nas",
"version": "4.2.0", "version": "4.2.1",
"description": "Latvijas Universitātes Normatīvo Aktu sistēmas TYPO3 spraudnis", "description": "Latvijas Universitātes Normatīvo Aktu sistēmas TYPO3 spraudnis",
"type": "typo3-cms-extension", "type": "typo3-cms-extension",
"keywords": [ "keywords": [
......
...@@ -7,9 +7,9 @@ $EM_CONF[$_EXTKEY] = [ ...@@ -7,9 +7,9 @@ $EM_CONF[$_EXTKEY] = [
'author' => 'Dainis Abols', 'author' => 'Dainis Abols',
'author_company' => 'University of Latvia', 'author_company' => 'University of Latvia',
'author_email' => 'dainis.abols@lu.lv', 'author_email' => 'dainis.abols@lu.lv',
'state' => 'alpha', 'state' => 'stable',
'clearCacheOnLoad' => true, 'clearCacheOnLoad' => true,
'version' => '4.2.0', 'version' => '4.2.1',
'constraints' => [ 'constraints' => [
'depends' => [ 'depends' => [
'typo3' => '9.5.0-10.9.99', 'typo3' => '9.5.0-10.9.99',
......
...@@ -4,7 +4,7 @@ TYPO3 Extension for Regulations (NAS) ...@@ -4,7 +4,7 @@ TYPO3 Extension for Regulations (NAS)
## Version ## Version
4.2.0 4.2.1
## Dependecies ## 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