|
34 | 34 | use TYPO3\CMS\Core\Resource\Driver\AbstractHierarchicalFilesystemDriver;
|
35 | 35 | use TYPO3\CMS\Core\Resource\Driver\DriverInterface;
|
36 | 36 | use TYPO3\CMS\Core\Resource\Exception\FolderDoesNotExistException;
|
| 37 | +use TYPO3\CMS\Core\Utility\ArrayUtility; |
37 | 38 | use TYPO3\CMS\Core\Utility\GeneralUtility;
|
38 | 39 | use TYPO3\CMS\Core\Utility\PathUtility;
|
39 | 40 |
|
@@ -73,7 +74,14 @@ class RemoteFileAbstractionLayerDriver extends AbstractHierarchicalFilesystemDri
|
73 | 74 | */
|
74 | 75 | public function __construct(array $configuration = array())
|
75 | 76 | {
|
76 |
| - parent::__construct($configuration); |
| 77 | + $defaultConfiguration = array( |
| 78 | + 'basePath' => '/', |
| 79 | + 'pathType' => 'relative', |
| 80 | + 'caseSensitive' => true, |
| 81 | + ); |
| 82 | + ArrayUtility::mergeRecursiveWithOverrule($defaultConfiguration, $configuration); |
| 83 | + parent::__construct($defaultConfiguration); |
| 84 | + |
77 | 85 | $this->sshConnection = SshConnection::makeInstance();
|
78 | 86 | $this->letterBox = GeneralUtility::makeInstance('In2code\\In2publishCore\\Domain\\Driver\\Rpc\\Letterbox');
|
79 | 87 | }
|
@@ -115,20 +123,17 @@ public function initialize()
|
115 | 123 | 'pathType' => 'relative',
|
116 | 124 | ),
|
117 | 125 | );
|
118 |
| - $this->configuration = array( |
119 |
| - 'basePath' => '/', |
120 |
| - 'pathType' => 'relative', |
121 |
| - ); |
122 | 126 | } else {
|
123 | 127 | $this->remoteDriverSettings = DatabaseUtility::buildForeignDatabaseConnection()->exec_SELECTgetSingleRow(
|
124 | 128 | '*',
|
125 | 129 | 'sys_file_storage',
|
126 | 130 | 'uid=' . (int)$this->storageUid
|
127 | 131 | );
|
128 | 132 | $flexFormService = GeneralUtility::makeInstance('TYPO3\\CMS\\Extbase\\Service\\FlexFormService');
|
129 |
| - $this->configuration = $flexFormService->convertFlexFormContentToArray( |
| 133 | + $driverConfiguration = $flexFormService->convertFlexFormContentToArray( |
130 | 134 | $this->remoteDriverSettings['configuration']
|
131 | 135 | );
|
| 136 | + ArrayUtility::mergeRecursiveWithOverrule($this->configuration, $driverConfiguration); |
132 | 137 | }
|
133 | 138 | if (!is_array($this->remoteDriverSettings)) {
|
134 | 139 | throw new \LogicException('Could not find the remote storage.', 1474470724);
|
|
0 commit comments