Compare commits
No commits in common. "ef04c8a17a7109ddb2c841deb12d496d5330e519" and "36539462255c5cb458b98e751ba49743e551d47e" have entirely different histories.
ef04c8a17a
...
3653946225
4 changed files with 3 additions and 7 deletions
|
@ -29,6 +29,7 @@ class Init {
|
||||||
// YOU REALLY SHOULD HAVE YOUR OWN CONFIG FILE!!!
|
// YOU REALLY SHOULD HAVE YOUR OWN CONFIG FILE!!!
|
||||||
|
|
||||||
if (!file_exists($config)) {
|
if (!file_exists($config)) {
|
||||||
|
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $config);
|
||||||
$config = Core::root_dir()."/sample-config/config.sample.ini";
|
$config = Core::root_dir()."/sample-config/config.sample.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,6 +40,7 @@ class Init {
|
||||||
// YOU REALLY SHOULD HAVE YOUR OWN SERVICES FILE!!!
|
// YOU REALLY SHOULD HAVE YOUR OWN SERVICES FILE!!!
|
||||||
|
|
||||||
if (!file_exists($services)) {
|
if (!file_exists($services)) {
|
||||||
|
echo copy(Core::root_dir()."/sample-config/services.sample.ini", $services);
|
||||||
$services = Core::root_dir()."/sample-config/services.sample.ini";
|
$services = Core::root_dir()."/sample-config/services.sample.ini";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
<?php class Core {
|
<?php class Core {
|
||||||
public static $Config;
|
public static $Config;
|
||||||
public const VERSION = "0.0.1";
|
|
||||||
public static $CurrentPage;
|
public static $CurrentPage;
|
||||||
public static function root_dir(){
|
public static function root_dir(){
|
||||||
return $_SERVER['DOCUMENT_ROOT'];
|
return $_SERVER['DOCUMENT_ROOT'];
|
||||||
|
|
|
@ -84,11 +84,6 @@ class Response {
|
||||||
public function __construct(){
|
public function __construct(){
|
||||||
// add requested page to response. I don't know why, but it could helpful for diagnostics at some point
|
// add requested page to response. I don't know why, but it could helpful for diagnostics at some point
|
||||||
$this->url = Core::$CurrentPage;
|
$this->url = Core::$CurrentPage;
|
||||||
if (!Core::$Config["CommitID"]){
|
$this->commit = Core::$Config["CommitID"];
|
||||||
$this->version = Core::VERSION;
|
|
||||||
} else {
|
|
||||||
$this->version = "git commit ".Core::$Config["CommitID"];
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue