diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/App.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/App.php b/src/App.php index fcf2699..7e0cabd 100644 --- a/src/App.php +++ b/src/App.php @@ -20,7 +20,7 @@ class App $content = [ 'data' => [], ]; - $contentRoot = dirname(__DIR__) . '/content'; + $contentRoot = $_ENV['app']['contentFolderPath']; $method = $request->getMethod(); $path = $request->getPathInfo(); @@ -85,7 +85,7 @@ class App $builder->addValue($entryKey, $entryValue); } - $entryDirectory = $formPath . '/entries/' . $date->format('Y/m/d'); + $entryDirectory = $formPath . '/' . $_ENV['form']['entriesFolderName'] . '/' . $date->format('Y/m/d'); @mkdir($entryDirectory, 0774, true); $entryFilename = $date->format('Ymd_Hi_') . hash('adler32', serialize($entry)) . '.toml'; file_put_contents( @@ -158,7 +158,7 @@ class App $config['api']['keys'] = $apiKeys; } - if (str_ends_with($currentFolder, '/content') || $currentFolder == '/') { + if (str_ends_with($currentFolder, '/' . basename($_ENV['app']['contentFolderPath'])) || $currentFolder == '/') { break; } |