mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 20:26:42 +00:00
Reorganize project part 2
This commit is contained in:
@@ -1,26 +1,28 @@
|
||||
<?php
|
||||
|
||||
class ApplicationService
|
||||
namespace Grocy\Services;
|
||||
|
||||
class ApplicationService extends BaseService
|
||||
{
|
||||
/**
|
||||
* @return boolean
|
||||
*/
|
||||
public static function IsDemoInstallation()
|
||||
public function IsDemoInstallation()
|
||||
{
|
||||
return file_exists(__DIR__ . '/../data/demo.txt');
|
||||
}
|
||||
|
||||
private static $InstalledVersion;
|
||||
private $InstalledVersion;
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public static function GetInstalledVersion()
|
||||
public function GetInstalledVersion()
|
||||
{
|
||||
if (self::$InstalledVersion == null)
|
||||
if ($this->InstalledVersion == null)
|
||||
{
|
||||
self::$InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
|
||||
$this->InstalledVersion = preg_replace("/\r|\n/", '', file_get_contents(__DIR__ . '/../version.txt'));
|
||||
}
|
||||
|
||||
return self::$InstalledVersion;
|
||||
return $this->InstalledVersion;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user