@@ -159,7 +159,7 @@ public function getSupportedMediaTypes($extraMediaTypes, $nativeSvgSupport) {
159159 public function getConfig ($ folderNode , $ features ) {
160160 $ this ->features = $ features ;
161161 list ($ albumConfig , $ ignored ) =
162- $ this ->collectConfig ($ folderNode , $ this ->ignoreAlbum , $ this ->configName );
162+ $ this ->collectConfig ($ folderNode , $ this ->ignoreAlbumStrings , $ this ->configName );
163163 if ($ ignored ) {
164164 throw new ForbiddenServiceException (
165165 'The owner has placed a restriction or the storage location is unavailable '
@@ -238,26 +238,28 @@ private function isMimeSupported($mimeType = '*') {
238238 * reached the root folder
239239 *
240240 * @param Folder $folder the current folder
241- * @param string $ignoreAlbum name of the file which blacklists folders
241+ * @param array $ignoreAlbumStrings names of the files which blacklist folders
242242 * @param string $configName name of the configuration file
243243 * @param int $level the starting level is 0 and we add 1 each time we visit a parent folder
244244 * @param array $configSoFar the configuration collected so far
245245 *
246246 * @return array <null|array,bool>
247247 */
248248 private function collectConfig (
249- $ folder , $ ignoreAlbum , $ configName , $ level = 0 , $ configSoFar = []
249+ $ folder , $ ignoreAlbumStrings , $ configName , $ level = 0 , $ configSoFar = []
250250 ) {
251- if ($ folder ->nodeExists ($ ignoreAlbum )) {
252- // Cancel as soon as we find out that the folder is private or external
253- return [null , true ];
251+ foreach ($ ignoreAlbumStrings as $ ignoreAlbum ) {
252+ if ($ folder ->nodeExists ($ ignoreAlbum )) {
253+ // Cancel as soon as we find out that the folder is private or external
254+ return [null , true ];
255+ }
254256 }
255257 $ isRootFolder = $ this ->isRootFolder ($ folder , $ level );
256258 if ($ folder ->nodeExists ($ configName )) {
257259 $ configSoFar = $ this ->buildFolderConfig ($ folder , $ configName , $ configSoFar , $ level );
258260 }
259261 if (!$ isRootFolder ) {
260- return $ this ->getParentConfig ($ folder , $ ignoreAlbum , $ configName , $ level , $ configSoFar );
262+ return $ this ->getParentConfig ($ folder , $ ignoreAlbumStrings , $ configName , $ level , $ configSoFar );
261263 }
262264 $ configSoFar = $ this ->validatesInfoConfig ($ configSoFar );
263265
@@ -345,7 +347,7 @@ private function validatesInfoConfig($albumConfig) {
345347 * We will look up to the virtual root of a shared folder, for privacy reasons
346348 *
347349 * @param Folder $folder the current folder
348- * @param string $privacyChecker name of the file which blacklists folders
350+ * @param string $privacyChecker names of the files which blacklist folders
349351 * @param string $configName name of the configuration file
350352 * @param int $level the starting level is 0 and we add 1 each time we visit a parent folder
351353 * @param array $collectedConfig the configuration collected so far
0 commit comments