neues Admin UI Layout eingeführt. Alle Tests auf den neusten Stand gebracht.
This commit is contained in:
@@ -40,23 +40,33 @@ class HelpSyncService
|
||||
|
||||
$articles = collect();
|
||||
|
||||
foreach (config('help.audiences', []) as $audience) {
|
||||
$audiencePath = $sourcePath.DIRECTORY_SEPARATOR.$audience;
|
||||
$audiences = config('help.audiences', []);
|
||||
$localeDirectories = $this->files->directories($sourcePath);
|
||||
$useLocaleDirectories = ! empty($localeDirectories);
|
||||
|
||||
if (! $this->files->isDirectory($audiencePath)) {
|
||||
continue;
|
||||
}
|
||||
$audienceRoots = $useLocaleDirectories
|
||||
? array_map(static fn (string $path) => $path.DIRECTORY_SEPARATOR, $localeDirectories)
|
||||
: [$sourcePath.DIRECTORY_SEPARATOR];
|
||||
|
||||
$files = $this->files->allFiles($audiencePath);
|
||||
foreach ($audienceRoots as $root) {
|
||||
foreach ($audiences as $audience) {
|
||||
$audiencePath = $root.$audience;
|
||||
|
||||
/** @var SplFileInfo $file */
|
||||
foreach ($files as $file) {
|
||||
if ($file->getExtension() !== 'md') {
|
||||
if (! $this->files->isDirectory($audiencePath)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$parsed = $this->parseFile($file);
|
||||
$articles->push($parsed);
|
||||
$files = $this->files->allFiles($audiencePath);
|
||||
|
||||
/** @var SplFileInfo $file */
|
||||
foreach ($files as $file) {
|
||||
if ($file->getExtension() !== 'md') {
|
||||
continue;
|
||||
}
|
||||
|
||||
$parsed = $this->parseFile($file);
|
||||
$articles->push($parsed);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user