Skip to content
Snippets Groups Projects
Commit 70ddd782 authored by Markus Klein's avatar Markus Klein Committed by Christian Kuhn
Browse files

[BUGFIX] Ensure Frontend User image update is not offered

Releases: master, 8.7
Resolves: #81180
Change-Id: I87a8a5b694ad579f6ba31feb10094298ecabf9e7
Reviewed-on: https://review.typo3.org/52745


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Reviewed-by: default avatarAndreas Fernandez <typo3@scripting-base.de>
Reviewed-by: default avatarJohannes Kasberger <johannes.kasberger@reelworx.at>
Reviewed-by: default avatarWouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
Tested-by: default avatarChristian Kuhn <lolli@schwarzbu.ch>
parent 00ce71a1
Branches
Tags
No related merge requests found
......@@ -19,6 +19,7 @@ use TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction;
use TYPO3\CMS\Core\Log\Logger;
use TYPO3\CMS\Core\Log\LogManager;
use TYPO3\CMS\Core\Registry;
use TYPO3\CMS\Core\Resource\File;
use TYPO3\CMS\Core\Resource\ResourceStorage;
use TYPO3\CMS\Core\Resource\StorageRepository;
use TYPO3\CMS\Core\Utility\GeneralUtility;
......@@ -123,13 +124,17 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate
*/
public function checkForUpdate(&$description)
{
if ($this->isWizardDone()) {
return false;
}
$description = 'This update wizard goes through all files that are referenced in the fe_users.image field'
. ' and adds the files to the FAL File Index.<br />'
. 'It also moves the files from uploads/ to the fileadmin/_migrated/ path.';
$this->init();
return !$this->isWizardDone() || $this->recordOffset !== [];
return $this->recordOffset !== [];
}
/**
......@@ -285,6 +290,7 @@ class FrontendUserImageUpdateWizard extends AbstractUpdate
try {
// if the source file does not exist, we should just continue, but leave a message in the docs;
// ideally, the user would be informed after the update as well.
/** @var File $file */
$file = $this->storage->getFile($this->targetPath . $item);
$fileUid = $file->getUid();
} catch (\InvalidArgumentException $e) {
......
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