mirror of
https://github.com/grocy/grocy.git
synced 2025-10-12 16:44:55 +00:00
Internal change that the demo instances (stable and pre-release) can be served through a single instance for all localizations (references #241)
This commit is contained in:
14
app.php
14
app.php
@@ -36,9 +36,21 @@ else
|
||||
// Load composer dependencies
|
||||
require_once __DIR__ . '/vendor/autoload.php';
|
||||
|
||||
// Definitions for the official demo instances
|
||||
// running on "<localization>.demo.grocy.info" and "<localization>.demo-prerelease.grocy.info
|
||||
// The language should automatically be determined by the subdomain
|
||||
if (string_ends_with(strtolower($_SERVER['HTTP_HOST']), 'grocy.info'))
|
||||
{
|
||||
$cultureBySubdomain = explode('.', $_SERVER['HTTP_HOST'])[0];
|
||||
if (file_exists(__DIR__ . "/localization/$cultureBySubdomain") && is_dir(__DIR__ . "/localization/$cultureBySubdomain"))
|
||||
{
|
||||
define('GROCY_CULTURE', $cultureBySubdomain);
|
||||
}
|
||||
}
|
||||
|
||||
// Load config files
|
||||
require_once GROCY_DATAPATH . '/config.php';
|
||||
require_once __DIR__ . '/config-dist.php'; //For not in own config defined values we use the default ones
|
||||
require_once __DIR__ . '/config-dist.php'; // For not in own config defined values we use the default ones
|
||||
|
||||
// Definitions for disabled authentication mode
|
||||
if (GROCY_DISABLE_AUTH === true)
|
||||
|
Reference in New Issue
Block a user