fix view function in init and update dirname level in install
This commit is contained in:
@@ -34,8 +34,8 @@ class Install
|
|||||||
public string $requiredVersion = '7.4.0';
|
public string $requiredVersion = '7.4.0';
|
||||||
public array $requiredExtensions = ['libxml', 'zip'];
|
public array $requiredExtensions = ['libxml', 'zip'];
|
||||||
public array $suggestedExtensions = ['curl'];
|
public array $suggestedExtensions = ['curl'];
|
||||||
public array $suggestions;
|
public array $suggestions = [];
|
||||||
public array $criticals;
|
public array $criticals = [];
|
||||||
|
|
||||||
public function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
@@ -76,7 +76,7 @@ class Install
|
|||||||
|
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
$formfield = require dirname(__DIR__) . '/lib/formfields/install/formfield.install.php';
|
$formfield = require dirname(__DIR__, 3) . '/lib/formfields/install/formfield.install.php';
|
||||||
|
|
||||||
// init twig
|
// init twig
|
||||||
UI::initTwig(true);
|
UI::initTwig(true);
|
||||||
|
|||||||
@@ -26,13 +26,6 @@
|
|||||||
// define default theme for configurehint, etc.
|
// define default theme for configurehint, etc.
|
||||||
$_deftheme = 'Froxlor';
|
$_deftheme = 'Froxlor';
|
||||||
|
|
||||||
function view($template, $attributes)
|
|
||||||
{
|
|
||||||
$view = file_get_contents(dirname(__DIR__) . '/templates/' . $template);
|
|
||||||
|
|
||||||
return str_replace(array_keys($attributes), array_values($attributes), $view);
|
|
||||||
}
|
|
||||||
|
|
||||||
// validate correct php version
|
// validate correct php version
|
||||||
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
|
if (version_compare("7.4.0", PHP_VERSION, ">=")) {
|
||||||
die(view($_deftheme . '/misc/phprequirementfailed.html.twig', [
|
die(view($_deftheme . '/misc/phprequirementfailed.html.twig', [
|
||||||
|
|||||||
Reference in New Issue
Block a user