From d09d47251ea7b4063e543f1c37d0554de10abc27 Mon Sep 17 00:00:00 2001 From: Paul Wilde Date: Tue, 10 Aug 2021 17:09:22 +0100 Subject: [PATCH] better version numbers --- src/core/init.php | 2 -- src/core/init/core.php | 1 + src/core/init/responder.php | 7 ++++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/init.php b/src/core/init.php index 03c1077..2239eba 100644 --- a/src/core/init.php +++ b/src/core/init.php @@ -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"; } diff --git a/src/core/init/core.php b/src/core/init/core.php index 01bdffa..6bd6a42 100644 --- a/src/core/init/core.php +++ b/src/core/init/core.php @@ -1,5 +1,6 @@ url = Core::$CurrentPage; - $this->commit = Core::$Config["CommitID"]; + if (!Core::$Config["CommitID"]){ + $this->version = Core::VERSION; + } else { + $this->version = "git commit ".Core::$Config["CommitID"]; + } + } }