[BUGFIX] Avoid using hardcoded uid of repository record 09/58609/2
authorGeorg Ringer <georg.ringer@gmail.com>
Wed, 10 Oct 2018 19:31:39 +0000 (21:31 +0200)
committerStefan Neufeind <typo3.neufeind@speedpartner.de>
Thu, 11 Oct 2018 06:27:03 +0000 (08:27 +0200)
As some situations might lead to a different uid set in the database
the correct repository should be found by the method 'findOneTypo3OrgRepository'.

Resolves: #86591
Releases: master
Change-Id: I8a1b9e8241b054f4d864dd5474f9eddfeaa44a6c
Reviewed-on: https://review.typo3.org/58609
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Nicole Cordes <typo3@cordes.co>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Josef Glatz <josef.glatz@typo3.org>
Reviewed-by: Tomas Norre Mikkelsen <tomasnorre@gmail.com>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
typo3/sysext/extensionmanager/Classes/Controller/UpdateFromTerController.php
typo3/sysext/extensionmanager/Classes/Utility/Repository/Helper.php
typo3/sysext/extensionmanager/ext_typoscript_setup.typoscript

index 99c20fd..7c3141c 100644 (file)
@@ -97,7 +97,7 @@ class UpdateFromTerController extends AbstractController
             }
         }
         /** @var \TYPO3\CMS\Extensionmanager\Domain\Model\Repository $repository */
-        $repository = $this->repositoryRepository->findByUid((int)$this->settings['repositoryUid']);
+        $repository = $this->repositoryRepository->findOneTypo3OrgRepository();
 
         $timeFormat = $this->getLanguageService()->sL('LLL:EXT:extensionmanager/Resources/Private/Language/locallang.xlf:extensionList.updateFromTer.lastUpdate.fullTimeFormat');
         $lastUpdateTime = $repository ? $repository->getLastUpdate() : null;
index d9a591e..253e903 100644 (file)
@@ -86,7 +86,7 @@ class Helper implements \TYPO3\CMS\Core\SingletonInterface
         $repositoryRepository = $this->objectManager->get(RepositoryRepository::class);
         $this->extensionRepository = $this->objectManager->get(ExtensionRepository::class);
         /** @var Repository $repository */
-        $repository = $repositoryRepository->findByUid(1);
+        $repository = $repositoryRepository->findOneTypo3OrgRepository();
         if (is_object($repository)) {
             $this->setRepository($repository);
         }
index bf4446f..a7831e9 100644 (file)
@@ -1,7 +1,4 @@
 module.tx_extensionmanager {
-       settings {
-               repositoryUid = 1
-       }
        features {
                 # if enabled, default controller and/or action is skipped when creating URIs through the URI Builder (see https://wiki.typo3.org/Skip_default_arguments_in_URIs)
                skipDefaultArguments = 0