[BUGFIX] Correctly set user storage permissions

With FAL a new way to define file permissions
(for storages) has been introduced. You can set
these in User TsConfig instead of doing it
in the user record.

There is a backwards compatibility layer, which should
set the permissions according to the database entry
in case no permissions have been set in TsConfig.
This however does not work, because of a wrong check
for existence of UserTsConfig properties.

Instead of checking for an array (which is always the case),
we have to check if the array is not empty.

Releases: 6.0, 6.1, 6.2
Resolves: #50872
Change-Id: I0ec30a1ae96c4b6916a3e46c7222f832c44f603e
Reviewed-on: https://review.typo3.org/22921
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Oliver Hader
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring
Reviewed-by: Helmut Hummel
Tested-by: Helmut Hummel
[FEATURE] Substitution of default markers in single function

In the function
TYPO3\CMS\Backend\Utility\BackendUtility::exec_foreign_table_where_query
a lot of default markers (like CURRENT_PID, etc.) are replaced.
It would be useful to have this substitution available as single
function, so that it can be called without executing some query.

Resolves: #21892
Releases: 6.2
Change-Id: I4da8279d1b95566690bb0934ac00299e4f4fee3e
Reviewed-on: https://review.typo3.org/22661
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
Reviewed-by: Nicole Cordes
Tested-by: Nicole Cordes
Reviewed-by: Anja Leichsenring
Tested-by: Anja Leichsenring