fix(legacy): look in /legacy for a VERSION file
This commit is contained in:
parent
252ab00a8e
commit
090a5c93ac
|
@ -264,12 +264,18 @@ class Config
|
||||||
|
|
||||||
public static function setAirtimeVersion()
|
public static function setAirtimeVersion()
|
||||||
{
|
{
|
||||||
$version = @file_get_contents(dirname(ROOT_PATH) . '/VERSION');
|
$version = LIBRETIME_MAJOR_VERSION;
|
||||||
if (!$version) {
|
|
||||||
// fallback to constant from constants.php if no other info is available
|
foreach ([ROOT_PATH, dirname(ROOT_PATH)] as $path) {
|
||||||
$version = LIBRETIME_MAJOR_VERSION;
|
$content = @file_get_contents($path . '/VERSION');
|
||||||
|
if ($content) {
|
||||||
|
$version = trim($content);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
self::$legacy_values['airtime_version'] = trim($version);
|
|
||||||
|
self::$legacy_values['airtime_version'] = $version;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getConfig()
|
public static function getConfig()
|
||||||
|
|
Loading…
Reference in New Issue