[BUGFIX] StorageRepository fails to load storages 34/27634/2
authorMarkus Klein <klein.t3@mfc-linz.at>
Fri, 14 Feb 2014 16:37:27 +0000 (17:37 +0100)
committerSteffen Ritter <info@rs-websystems.de>
Mon, 17 Feb 2014 09:58:37 +0000 (10:58 +0100)
StorageRepository fails to load storages if new one is created.
This is regression to #55186.

Resolves: #55992
Releases: 6.2
Change-Id: I72dc36bb01141695249cf104237f10dfdcfc2b16
Reviewed-on: https://review.typo3.org/27634
Reviewed-by: Steffen Ritter
Reviewed-by: Frans Saris
Tested-by: Steffen Ritter
typo3/sysext/core/Classes/Resource/StorageRepository.php

index 6a0d78e..eed5977 100644 (file)
@@ -116,7 +116,7 @@ class StorageRepository extends AbstractRepository {
 
                        if (static::$storageRowCache === array()) {
                                $storageObjectsExists = $this->db->exec_SELECTgetSingleRow('uid', $this->table, '');
-                               if ($storageObjectsExists !==  NULL) {
+                               if ($storageObjectsExists !== NULL) {
                                        if ($this->createLocalStorage(
                                                'fileadmin/ (auto-created)',
                                                $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'],
@@ -124,6 +124,8 @@ class StorageRepository extends AbstractRepository {
                                                'This is the local fileadmin/ directory. This storage mount has been created automatically by TYPO3.',
                                                TRUE
                                        ) > 0 ) {
+                                               // reset to null to force reloading of storages
+                                               static::$storageRowCache = NULL;
                                                // call self for initialize Cache
                                                $this->initializeLocalCache();
                                        }