mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 01:32:38 +00:00
29 lines
501 B
PHP
29 lines
501 B
PHP
<?php
|
|
|
|
namespace Grocy\Services;
|
|
|
|
class ApplicationService extends BaseService
|
|
{
|
|
/**
|
|
* @return boolean
|
|
*/
|
|
public function IsDemoInstallation()
|
|
{
|
|
return file_exists(__DIR__ . '/../data/demo.txt');
|
|
}
|
|
|
|
private $InstalledVersion;
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function GetInstalledVersion()
|
|
{
|
|
if ($this->InstalledVersion == null)
|
|
{
|
|
$this->InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
|
|
}
|
|
|
|
return $this->InstalledVersion;
|
|
}
|
|
}
|