mirror of
https://github.com/grocy/grocy.git
synced 2025-09-18 18:46:51 +00:00
27 lines
475 B
PHP
27 lines
475 B
PHP
![]() |
<?php
|
||
|
|
||
|
class ApplicationService
|
||
|
{
|
||
|
/**
|
||
|
* @return boolean
|
||
|
*/
|
||
|
public static function IsDemoInstallation()
|
||
|
{
|
||
|
return file_exists(__DIR__ . '/../data/demo.txt');
|
||
|
}
|
||
|
|
||
|
private static $InstalledVersion;
|
||
|
/**
|
||
|
* @return string
|
||
|
*/
|
||
|
public static function GetInstalledVersion()
|
||
|
{
|
||
|
if (self::$InstalledVersion == null)
|
||
|
{
|
||
|
self::$InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
|
||
|
}
|
||
|
|
||
|
return self::$InstalledVersion;
|
||
|
}
|
||
|
}
|