permission checking

This commit is contained in:
Roman Hergenreder 2020-06-18 15:35:09 +02:00
parent f91567186e
commit b7d3e569d3
2 changed files with 10 additions and 4 deletions

0
core/Configuration/KeyData.class.php Normal file → Executable file

@ -1,6 +1,7 @@
<?php
use Api\Request;
use Configuration\Configuration;
use Documents\Document404;
use Elements\Document;
@ -8,16 +9,21 @@ include_once 'core/core.php';
include_once 'core/datetime.php';
include_once 'core/constants.php';
if (!is_readable(getClassPath(Configuration::class))) {
die("Configuration directory is not readable, please check permissions before proceeding");
}
spl_autoload_extensions(".php");
spl_autoload_register(function($class) {
$full_path = getClassPath($class);
if(file_exists($full_path))
$full_path = getClassPath($class, true);
if(file_exists($full_path)) {
include_once $full_path;
else
} else {
include_once getClassPath($class, false);
}
});
$config = new Configuration\Configuration();
$config = new Configuration();
$installation = (!$config->load());
$user = new Objects\User($config);