mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
Support custom DB path suffixes for demo mode (closes #395)
This commit is contained in:
parent
bbdc372dcf
commit
f9d566c55c
@ -92,7 +92,13 @@ class DatabaseService
|
||||
{
|
||||
if (GROCY_MODE === 'demo' || GROCY_MODE === 'prerelease')
|
||||
{
|
||||
return GROCY_DATAPATH . '/grocy_' . GROCY_DEFAULT_LOCALE . '.db';
|
||||
$dbSuffix = GROCY_DEFAULT_LOCALE;
|
||||
if (defined('GROCY_DEMO_DB_SUFFIX'))
|
||||
{
|
||||
$dbSuffix = GROCY_DEMO_DB_SUFFIX;
|
||||
}
|
||||
|
||||
return GROCY_DATAPATH . '/grocy_' . $dbSuffix . '.db';
|
||||
}
|
||||
|
||||
return GROCY_DATAPATH . '/grocy.db';
|
||||
|
Loading…
x
Reference in New Issue
Block a user