Compare commits

..

2 commits

4 changed files with 7 additions and 3 deletions

View file

@ -29,7 +29,6 @@ class Init {
// YOU REALLY SHOULD HAVE YOUR OWN CONFIG FILE!!!
if (!file_exists($config)) {
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $config);
$config = Core::root_dir()."/sample-config/config.sample.ini";
}
@ -40,7 +39,6 @@ class Init {
// YOU REALLY SHOULD HAVE YOUR OWN SERVICES FILE!!!
if (!file_exists($services)) {
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $services);
$services = Core::root_dir()."/sample-config/services.sample.ini";
}

View file

@ -1,5 +1,6 @@
<?php class Core {
public static $Config;
public const VERSION = "0.0.1";
public static $CurrentPage;
public static function root_dir(){
return $_SERVER['DOCUMENT_ROOT'];

View file

@ -84,6 +84,11 @@ class Response {
public function __construct(){
// add requested page to response. I don't know why, but it could helpful for diagnostics at some point
$this->url = Core::$CurrentPage;
$this->commit = Core::$Config["CommitID"];
if (!Core::$Config["CommitID"]){
$this->version = Core::VERSION;
} else {
$this->version = "git commit ".Core::$Config["CommitID"];
}
}
}