[TASK] Add possibility to resolve a default storage 45/26945/6
authorSteffen Ritter <info@rs-websystems.de>
Mon, 20 Jan 2014 17:33:28 +0000 (18:33 +0100)
committerBenjamin Mack <benni@typo3.org>
Sun, 2 Feb 2014 14:40:35 +0000 (15:40 +0100)
commit90a1c7cbee01e00a723fb0a9afad154e0d32f841
tree41eb200e37ddc23beebb340cdba8cc883597a92d
parentdd9fe5932d08635b0dfba96c3d21a9eb858c2e72
[TASK] Add possibility to resolve a default storage

Before FAL a default upload folder has been retrived by setting
$GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'user_upload'.
With FAL this even could be placed on a remote system. Furthermore
we do not won't users to fiddle around with path like that anymore.

Each Storage already provides "getDefaultFolder" meant for uploads.
But still, if there are several storages, there is no way to figure
out which storage should be the default one for uploads, if it is
legacy code or just not configurable.

This patch introduces the concept of a default storage as a flag
which can be set within the storage record. The automatic creation
of /fileadmin/ - storage will have this flag already set.

Resolves: #55177
Releases: 6.2
Change-Id: I6684670c5acb023bc26596e9a55ca84bb5c41b40
Reviewed-on: https://review.typo3.org/26945
Reviewed-by: Frans Saris
Tested-by: Frans Saris
Reviewed-by: Benjamin Mack
Tested-by: Benjamin Mack
typo3/sysext/core/Classes/Resource/ResourceFactory.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Classes/Resource/StorageRepository.php
typo3/sysext/core/Configuration/DefaultConfiguration.php
typo3/sysext/core/Configuration/TCA/sys_file_storage.php
typo3/sysext/core/ext_tables.sql
typo3/sysext/lang/locallang_tca.xlf