[BUGFIX] FAL: Misleading default filter array name
authorAndreas Wolf <andreas.wolf@typo3.org>
Sat, 20 Oct 2012 20:18:52 +0000 (22:18 +0200)
committerSteffen Ritter <info@rs-websystems.de>
Sun, 21 Oct 2012 12:32:32 +0000 (14:32 +0200)
The key for the default filters array in the default configuration of
TYPO3 is callbackFilterMethods. This is misleading, as one might see
this as a list of *all* available filters. Therefore, the key is renamed
to defaultFilterCallbacks.

The name change does not break any public API as the array key is only
used in one place: the ResourceStorage.

Resolves: #42239
Releases: 6.0
Change-Id: I48282f8e49ab786aaf8821badfb411a653e9a3fc
Reviewed-on: http://review.typo3.org/15856
Reviewed-by: Steffen Ritter
Tested-by: Steffen Ritter
t3lib/stddb/DefaultConfiguration.php
typo3/sysext/core/Classes/Resource/ResourceStorage.php
typo3/sysext/core/Tests/Unit/Resource/ResourceStorageTest.php

index eb0cb92..9fb25e7 100644 (file)
@@ -200,7 +200,7 @@ return array(
                                        'label' => 'Local filesystem'
                                )
                        ),
-                       'callbackFilterMethods' => array(
+                       'defaultFilterCallbacks' => array(
                                array(
                                        'TYPO3\\CMS\\Core\\Resource\\Filter\\FileNameFilter',
                                        'filterHiddenFilesAndFolders'
index 532bfa4..d72028e 100644 (file)
@@ -830,7 +830,7 @@ class ResourceStorage {
         * @return void
         */
        public function resetFileAndFolderNameFiltersToDefault() {
-               $this->fileAndFolderNameFilters = $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['callbackFilterMethods'];
+               $this->fileAndFolderNameFilters = $GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['defaultFilterCallbacks'];
        }
 
        /**
index d916fc9..1eb8379 100644 (file)
@@ -210,7 +210,7 @@ class ResourceStorageTest extends \TYPO3\CMS\Core\Tests\Unit\Resource\BaseTestCa
         */
        public function fileAndFolderListFiltersAreInitializedWithDefaultFilters() {
                $this->prepareFixture(array());
-               $this->assertEquals($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['callbackFilterMethods'], $this->fixture->getFileAndFolderNameFilters());
+               $this->assertEquals($GLOBALS['TYPO3_CONF_VARS']['SYS']['fal']['defaultFilterCallbacks'], $this->fixture->getFileAndFolderNameFilters());
        }
 
        /**