"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "system/src/Grav/Framework/Flex/FlexDirectory.php" between
grav-v1.7.17.zip and grav-v1.7.18.zip

About: Grav is a fast, simple, and flexible flat-file based CMS platform (using YAML and PHP). Contents are just simple markdown files in folders with optional extensions via API and hooks.

FlexDirectory.php  (grav-v1.7.17):FlexDirectory.php  (grav-v1.7.18)
skipping to change at line 238 skipping to change at line 238
* @param string $name * @param string $name
* @return array * @return array
* @internal * @internal
*/ */
public function loadDirectoryConfig(string $name): array public function loadDirectoryConfig(string $name): array
{ {
$grav = Grav::instance(); $grav = Grav::instance();
/** @var UniformResourceLocator $locator */ /** @var UniformResourceLocator $locator */
$locator = $grav['locator']; $locator = $grav['locator'];
$filename = $locator->findResource($this->getDirectoryConfigUri($name), $uri = $this->getDirectoryConfigUri($name);
true);
// If configuration is found in main configuration, use it.
if (str_starts_with($uri, 'config://')) {
$path = strtr(substr($uri, 9, -5), '/', '.');
return $grav['config']->get($path);
}
// Load the configuration file.
$filename = $locator->findResource($uri, true);
if ($filename === false) { if ($filename === false) {
return []; return [];
} }
$file = YamlFile::instance($filename); $file = YamlFile::instance($filename);
return $file->content(); return $file->content();
} }
/** /**
 End of changes. 1 change blocks. 
2 lines changed or deleted 11 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)