Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Open
LU Notices
Commits
70ce68a6
Commit
70ce68a6
authored
Apr 30, 2021
by
Dainis Abols
Browse files
4.2.1
parent
51cd1d8e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Classes/Updates/FileMigrationWizard.php
View file @
70ce68a6
...
...
@@ -71,7 +71,7 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
*
* @var string
*/
protected
$targetPath
=
'
_migrate
d/'
;
protected
$targetPath
=
'
user_uploa
d/'
;
/**
* @return string Unique identifier of this updater
...
...
@@ -208,26 +208,9 @@ class FileMigrationWizard implements UpgradeWizardInterface, ChattyInterface, Lo
$fileUid
=
null
;
$sourcePath
=
Environment
::
getPublicPath
()
.
'/'
.
$item
;
$strippedPath
=
str_replace
(
"fileadmin/user_upload/"
,
""
,
$item
);
$targetDirectory
=
Environment
::
getPublicPath
()
.
'/'
.
$fileadminDirectory
.
$this
->
targetPath
;
$targetPath
=
$targetDirectory
.
$strippedPath
;
// Remove file name
$temp
=
explode
(
"/"
,
$strippedPath
);
array_pop
(
$temp
);
$subdir
=
implode
(
"/"
,
$temp
);
$subdir
=
$targetDirectory
.
$subdir
;
// maybe the file was already moved, so check if the original file still exists
if
(
file_exists
(
$sourcePath
)
&&
!
is_dir
(
$sourcePath
))
{
if
(
!
is_dir
(
$targetDirectory
))
{
GeneralUtility
::
mkdir_deep
(
$targetDirectory
);
}
// Create subdirectory
if
(
!
is_dir
(
$subdir
))
{
GeneralUtility
::
mkdir_deep
(
$subdir
);
}
// see if the file already exists in the storage
$fileSha1
=
sha1_file
(
$sourcePath
);
...
...
@@ -247,9 +230,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
);
}
}
...
...
composer.json
View file @
70ce68a6
{
"name"
:
"luitd/lu-notices"
,
"version"
:
"4.2.
0
"
,
"version"
:
"4.2.
1
"
,
"description"
:
"General notice publisher for internal portal"
,
"type"
:
"typo3-cms-extension"
,
"keywords"
:
[
...
...
ext_emconf.php
View file @
70ce68a6
...
...
@@ -9,7 +9,7 @@ $EM_CONF[$_EXTKEY] = [
'author_company'
=>
'University of Latvia'
,
'state'
=>
'stable'
,
'clearCacheOnLoad'
=>
true
,
'version'
=>
'4.2.
0
'
,
'version'
=>
'4.2.
1
'
,
'constraints'
=>
[
'depends'
=>
[
'typo3'
=>
'9.5.0-10.9.99'
,
...
...
readme.md
View file @
70ce68a6
...
...
@@ -4,7 +4,7 @@
## Version
4.
2.
0
4.
2.
1
## Dependencies
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment