summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--public/index.php14
-rw-r--r--src/App.php8
2 files changed, 11 insertions, 11 deletions
diff --git a/public/index.php b/public/index.php
index b7895e7..3d82924 100644
--- a/public/index.php
+++ b/public/index.php
@@ -7,14 +7,14 @@ require_once dirname(__DIR__) . '/vendor/autoload.php';
function findAppConfigFile($path)
{
- $currentFolder = $path;
- while ($currentFolder !== '/') {
- $configFile = $currentFolder . '/config.toml';
+ $currentDirectory = $path;
+ while ($currentDirectory !== '/') {
+ $configFile = $currentDirectory . '/config.toml';
if (file_exists($configFile)) {
return $configFile;
}
- $currentFolder = dirname($currentFolder);
+ $currentDirectory = dirname($currentDirectory);
}
die('config.toml missing');
@@ -24,9 +24,9 @@ $configFile = findAppConfigFile(dirname(__DIR__));
$config = Toml::parseFile($configFile);
chdir(dirname($configFile));
-$contentFolderPath = realpath($config['app']['contentFolderPath']);
-$contentFolderPath === false && die('Content folder "' . $config['app']['contentFolderPath'] . '" missing');
-$config['app']['contentFolderPath'] = $contentFolderPath;
+$contentDirectoryPath = realpath($config['app']['contentFolderPath']);
+$contentDirectoryPath === false && die('Content folder "' . $config['app']['contentFolderPath'] . '" missing');
+$config['app']['contentFolderPath'] = $contentDirectoryPath;
chdir($_SERVER['DOCUMENT_ROOT']);
foreach ($config as $key => $value) {
diff --git a/src/App.php b/src/App.php
index b2c877e..b270b02 100644
--- a/src/App.php
+++ b/src/App.php
@@ -256,9 +256,9 @@ class App
public function buildConfig($formPath)
{
$config = [];
- $currentFolder = $formPath;
+ $currentDirectory = $formPath;
while (true) {
- $configFile = $currentFolder . '/config/config.toml';
+ $configFile = $currentDirectory . '/config/config.toml';
if (file_exists($configFile)) {
$parsedConfig = Toml::parseFile($configFile);
@@ -267,11 +267,11 @@ class App
$config['api']['keys'] = $apiKeys;
}
- if (str_ends_with($currentFolder, '/' . basename($_ENV['app']['contentFolderPath'])) || $currentFolder == '/') {
+ if (str_ends_with($currentDirectory, '/' . basename($_ENV['app']['contentFolderPath'])) || $currentDirectory == '/') {
break;
}
- $currentFolder = dirname($currentFolder);
+ $currentDirectory = dirname($currentDirectory);
}
return $config;