fix patch
This commit is contained in:
parent
095a3e6590
commit
3569049d20
|
@ -1,3 +1,46 @@
|
||||||
|
diff --git a/app.php b/app.php
|
||||||
|
index bc5b1b3..26f7687 100644
|
||||||
|
--- a/app.php
|
||||||
|
+++ b/app.php
|
||||||
|
@@ -12,7 +12,7 @@ use Slim\Views\Blade;
|
||||||
|
require_once __DIR__ . '/packages/autoload.php';
|
||||||
|
|
||||||
|
// Load config files
|
||||||
|
-require_once GROCY_DATAPATH . '/config.php';
|
||||||
|
+require_once getenv('GROCY_CONFIG_FILE');
|
||||||
|
require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones
|
||||||
|
require_once __DIR__ . '/helpers/ConfigurationValidator.php';
|
||||||
|
|
||||||
|
@@ -64,7 +64,7 @@ $app = AppFactory::create();
|
||||||
|
$container = $app->getContainer();
|
||||||
|
$container->set('view', function (Container $container)
|
||||||
|
{
|
||||||
|
- return new Blade(__DIR__ . '/views', GROCY_DATAPATH . '/viewcache');
|
||||||
|
+ return new Blade(__DIR__ . '/views', getenv('GROCY_CACHE_DIR'));
|
||||||
|
});
|
||||||
|
|
||||||
|
$container->set('UrlManager', function (Container $container)
|
||||||
|
@@ -106,7 +106,7 @@ $errorMiddleware->setDefaultErrorHandler(
|
||||||
|
|
||||||
|
$app->add(new CorsMiddleware($app->getResponseFactory()));
|
||||||
|
|
||||||
|
-$app->getRouteCollector()->setCacheFile(GROCY_DATAPATH . '/viewcache/route_cache.php');
|
||||||
|
+$app->getRouteCollector()->setCacheFile(getenv('GROCY_CACHE_DIR') . '/route_cache.php');
|
||||||
|
|
||||||
|
ob_clean(); // No response output before here
|
||||||
|
$app->run();
|
||||||
|
diff --git a/helpers/PrerequisiteChecker.php b/helpers/PrerequisiteChecker.php
|
||||||
|
index 8e12a5c..37b433d 100644
|
||||||
|
--- a/helpers/PrerequisiteChecker.php
|
||||||
|
+++ b/helpers/PrerequisiteChecker.php
|
||||||
|
@@ -18,7 +18,6 @@ class PrerequisiteChecker
|
||||||
|
public function checkRequirements()
|
||||||
|
{
|
||||||
|
self::checkForPhpVersion();
|
||||||
|
- self::checkForConfigFile();
|
||||||
|
self::checkForConfigDistFile();
|
||||||
|
self::checkForComposer();
|
||||||
|
self::checkForPhpExtensions();
|
||||||
diff --git a/services/DatabaseService.php b/services/DatabaseService.php
|
diff --git a/services/DatabaseService.php b/services/DatabaseService.php
|
||||||
index ba79a73..e6cf14f 100644
|
index ba79a73..e6cf14f 100644
|
||||||
--- a/services/DatabaseService.php
|
--- a/services/DatabaseService.php
|
||||||
|
@ -11,6 +54,19 @@ index ba79a73..e6cf14f 100644
|
||||||
if (file_exists($logFilePath))
|
if (file_exists($logFilePath))
|
||||||
{
|
{
|
||||||
file_put_contents($logFilePath, $sql . PHP_EOL, FILE_APPEND);
|
file_put_contents($logFilePath, $sql . PHP_EOL, FILE_APPEND);
|
||||||
|
diff --git a/services/FilesService.php b/services/FilesService.php
|
||||||
|
index 7d07035..a6dd4b0 100644
|
||||||
|
--- a/services/FilesService.php
|
||||||
|
+++ b/services/FilesService.php
|
||||||
|
@@ -10,7 +10,7 @@ class FilesService extends BaseService
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
- $this->StoragePath = GROCY_DATAPATH . '/storage';
|
||||||
|
+ $this->StoragePath = getenv('GROCY_STORAGE_DIR');
|
||||||
|
if (!file_exists($this->StoragePath))
|
||||||
|
{
|
||||||
|
mkdir($this->StoragePath);
|
||||||
diff --git a/services/StockService.php b/services/StockService.php
|
diff --git a/services/StockService.php b/services/StockService.php
|
||||||
index 9f034a5..fd3c0b7 100644
|
index 9f034a5..fd3c0b7 100644
|
||||||
--- a/services/StockService.php
|
--- a/services/StockService.php
|
||||||
|
|
Loading…
Reference in a new issue