[TASK] Follow-up only display active Avatar files 94/41694/2
authorFrans Saris <franssaris@gmail.com>
Sun, 19 Jul 2015 08:37:20 +0000 (10:37 +0200)
committerSusanne Moog <typo3@susannemoog.de>
Sun, 19 Jul 2015 09:18:30 +0000 (11:18 +0200)
Resolves: #68356
Release: master
Change-Id: I1373bcb4978c1c632a09b1cc26cb775a85170412
Reviewed-on: http://review.typo3.org/41694
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
Reviewed-by: Susanne Moog <typo3@susannemoog.de>
Tested-by: Susanne Moog <typo3@susannemoog.de>
typo3/sysext/backend/Classes/Backend/Avatar/Avatar.php
typo3/sysext/setup/Classes/Controller/SetupModuleController.php

index fd3055a..fe94c9a 100644 (file)
@@ -14,6 +14,7 @@ namespace TYPO3\CMS\Backend\Backend\Avatar;
  * The TYPO3 project - inspiring people to share!
  */
 
+use TYPO3\CMS\Backend\Utility\BackendUtility;
 use TYPO3\CMS\Backend\Utility\IconUtility;
 use TYPO3\CMS\Core\Resource\ResourceFactory;
 use TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException;
@@ -82,7 +83,8 @@ class Avatar {
                        'uid_local',
                        'sys_file_reference',
                        'tablenames = \'be_users\' AND fieldname = \'avatar\' AND ' .
-                       'table_local = \'sys_file\' AND uid_foreign = ' . (int)$beUserId
+                       'table_local = \'sys_file\' AND uid_foreign = ' . (int)$beUserId .
+                       BackendUtility::BEenableFields('sys_file_reference') . BackendUtility::deleteClause('sys_file_reference')
                );
                return $file ? $file['uid_local'] : 0;
        }
index d87a9aa..6b0e5f2 100644 (file)
@@ -867,7 +867,8 @@ class SetupModuleController {
                        'uid_local',
                        'sys_file_reference',
                        'tablenames = \'be_users\' AND fieldname = \'avatar\' AND ' .
-                       'table_local = \'sys_file\' AND uid_foreign = ' . (int)$beUserId
+                       'table_local = \'sys_file\' AND uid_foreign = ' . (int)$beUserId .
+                       BackendUtility::BEenableFields('sys_file_reference') . BackendUtility::deleteClause('sys_file_reference')
                );
                return $file ? $file['uid_local'] : 0;
        }