apps/gallery/lib/Service/ConfigService.php
/**
	 * Returns an album configuration array
	 *
	 * Goes through all the parent folders until either we're told the album is private or we've
	 * reached the root folder
	 *
	 * @param Folder $folder the current folder
	 * @param string $ignoreAlbum name of the file which blacklists folders
	 * @param string $configName name of the configuration file
	 * @param int $level the starting level is 0 and we add 1 each time we visit a parent folder
	 * @param array $configSoFar the configuration collected so far
	 *
	 * @return array <null|array,bool>
	 */
Returns an album configuration array
Goes through all the parent folders until either we're told the album is private or we've
reached the root folder



@return array 
Returns an album configuration array Goes through all the parent folders until either we ' re told the album is private or we ' ve reached the root folder @return array
private function collectConfig(
		$folder, $ignoreAlbum, $configName, $level = 0, $configSoFar = []
	) {
		if ($folder->nodeExists($ignoreAlbum)) {
			return [null, true];
		}
		$isRootFolder = $this->isRootFolder($folder, $level);
		if ($folder->nodeExists($configName)) {
			$configSoFar = $this->buildFolderConfig($folder, $configName, $configSoFar, $level);
		}
		if (!$isRootFolder) {
			return $this->getParentConfig($folder, $ignoreAlbum, $configName, $level, $configSoFar);
		}
		$configSoFar = $this->validatesInfoConfig($configSoFar);
		return [$configSoFar, false];
	}
private function collectConfig ( $ folder , $ ignoreAlbum , $ configName , $ level = 0 , $ configSoFar = [ ] ) { if ( $ folder -> nodeExists ( $ ignoreAlbum ) ) { return [ null , true ] ; } $ isRootFolder = $ this -> isRootFolder ( $ folder , $ level ) ; if ( $ folder -> nodeExists ( $ configName ) ) { $ configSoFar = $ this -> buildFolderConfig ( $ folder , $ configName , $ configSoFar , $ level ) ; } if ( ! $ isRootFolder ) { return $ this -> getParentConfig ( $ folder , $ ignoreAlbum , $ configName , $ level , $ configSoFar ) ; } $ configSoFar = $ this -> validatesInfoConfig ( $ configSoFar ) ; return [ $ configSoFar , false ] ; }
Returns an album configuration array
 Goes through all the parent folders until either we're told the album is private or we've
 reached the root folder
Returns an album configuration array Goes through all the parent folders until either we ' re told the album is private or we ' ve reached the root folder
// Cancel as soon as we find out that the folder is private or external // We have reached the root folder