[BUGFIX] Show deleted records in recycler 60/58660/2
authorStefan Froemken <froemken@gmail.com>
Fri, 19 Oct 2018 07:45:34 +0000 (09:45 +0200)
committerBenni Mack <benni@typo3.org>
Fri, 26 Oct 2018 13:25:45 +0000 (15:25 +0200)
Show deleted records in recycler also when
related be_user was deleted completely from database.

Resolves: #86696
Releases: master
Change-Id: Idc16781ce4bb0c28be48cc86052738110c500165
Reviewed-on: https://review.typo3.org/58660
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Daniel Goerz <daniel.goerz@posteo.de>
Tested-by: Daniel Goerz <daniel.goerz@posteo.de>
Reviewed-by: Rudy Gnodde <rgn@windinternet.nl>
Reviewed-by: Ursula Klinger <klinger@punkt.de>
Tested-by: Ursula Klinger <klinger@punkt.de>
Tested-by: Eike Starkmann <starkmann@undkonsorten.com>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Jürgen Heym <juergen.heym@hof-university.de>
Tested-by: Jürgen Heym <juergen.heym@hof-university.de>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/recycler/Classes/Controller/DeletedRecordsController.php
typo3/sysext/recycler/Resources/Private/Language/locallang.xlf

index 15294b4..b7411c3 100644 (file)
@@ -23,6 +23,7 @@ use TYPO3\CMS\Core\DataHandling\History\RecordHistoryStore;
 use TYPO3\CMS\Core\Imaging\Icon;
 use TYPO3\CMS\Core\Imaging\IconFactory;
 use TYPO3\CMS\Core\Utility\GeneralUtility;
+use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
 use TYPO3\CMS\Recycler\Utility\RecyclerUtility;
 
 /**
@@ -131,7 +132,14 @@ class DeletedRecordsController
             $username = $this->runtimeCache->get($cacheId);
         } else {
             $backendUser = BackendUtility::getRecord('be_users', $userId, 'username', '', false);
-            $username = $backendUser['username'];
+            if ($backendUser === null) {
+                $username = sprintf(
+                    '[%s]',
+                    LocalizationUtility::translate('LLL:EXT:recycler/Resources/Private/Language/locallang.xlf:record.deleted')
+                );
+            } else {
+                $username = $backendUser['username'];
+            }
             $this->runtimeCache->set($cacheId, $username);
         }
         return $username;
index e0812d7..ee64303 100644 (file)
                        <trans-unit id="table.header.path">
                                <source>Path</source>
                        </trans-unit>
+                       <trans-unit id="record.deleted">
+                               <source>deleted</source>
+                       </trans-unit>
                </body>
        </file>
 </xliff>