From e5518e097694c1b244eae97cd0e0754e2156d2b9 Mon Sep 17 00:00:00 2001 From: Luke Towers Date: Tue, 6 Nov 2018 14:48:47 -0600 Subject: [PATCH] Update AutoDatasource->getAvailablePaths implementation to match updated interface --- modules/cms/classes/AutoDatasource.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/cms/classes/AutoDatasource.php b/modules/cms/classes/AutoDatasource.php index 8126ddced..ab80be836 100644 --- a/modules/cms/classes/AutoDatasource.php +++ b/modules/cms/classes/AutoDatasource.php @@ -344,14 +344,15 @@ class AutoDatasource extends Datasource implements DatasourceInterface /** * Get all available paths within this datastore * - * @return array $paths ['path/to/file1.md', 'path/to/file2.md'] + * @return array $paths ['path/to/file1.md' => true (path can be handled and exists), 'path/to/file2.md' => false (path can be handled but doesn't exist)] */ public function getAvailablePaths() { $paths = []; - foreach ($this->datasources as $datasource) { + $datasources = array_reverse($this->datasources); + foreach ($datasources as $datasource) { $paths = array_merge($paths, $datasource->getAvailablePaths()); } - return array_unique($paths); + return $paths; } } \ No newline at end of file