From 26843721569182d9d5f99e0a4fc2935b7f532c42 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Thu, 30 Nov 2023 11:39:47 +0100 Subject: [PATCH] little work on installation; replace hardcoded strings with variables/constants; update dependencies Signed-off-by: Michael Kaufmann --- composer.lock | 144 ++++++++++--------- customer_domains.php | 2 +- customer_email.php | 4 +- customer_extras.php | 6 +- customer_ftp.php | 2 +- customer_mysql.php | 2 +- lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php | 5 +- lib/Froxlor/Froxlor.php | 2 + lib/Froxlor/Install/Install.php | 28 ++-- lib/Froxlor/Install/Requirements.php | 2 +- lib/navigation/00.froxlor.main.php | 8 +- lng/de.lng.php | 2 +- lng/en.lng.php | 2 +- 13 files changed, 108 insertions(+), 101 deletions(-) diff --git a/composer.lock b/composer.lock index 8653f110..91770db8 100644 --- a/composer.lock +++ b/composer.lock @@ -8,16 +8,16 @@ "packages": [ { "name": "amnuts/opcache-gui", - "version": "3.5.2", + "version": "3.5.4", "source": { "type": "git", "url": "https://github.com/amnuts/opcache-gui.git", - "reference": "db9df06889067f99d95bb9f226ec99e663aed196" + "reference": "f3a8fe44c0a4c69dd69b9999d68f9097ee362946" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/amnuts/opcache-gui/zipball/db9df06889067f99d95bb9f226ec99e663aed196", - "reference": "db9df06889067f99d95bb9f226ec99e663aed196", + "url": "https://api.github.com/repos/amnuts/opcache-gui/zipball/f3a8fe44c0a4c69dd69b9999d68f9097ee362946", + "reference": "f3a8fe44c0a4c69dd69b9999d68f9097ee362946", "shasum": "" }, "require": { @@ -58,7 +58,7 @@ "support": { "email": "andy@amnuts.com", "issues": "https://github.com/amnuts/opcache-gui/issues", - "source": "https://github.com/amnuts/opcache-gui/tree/3.5.2" + "source": "https://github.com/amnuts/opcache-gui/tree/3.5.4" }, "funding": [ { @@ -66,7 +66,7 @@ "type": "github" } ], - "time": "2023-10-02T10:23:26+00:00" + "time": "2023-10-25T19:09:56+00:00" }, { "name": "dflydev/dot-access-data", @@ -674,16 +674,16 @@ }, { "name": "phpmailer/phpmailer", - "version": "v6.8.1", + "version": "v6.9.1", "source": { "type": "git", "url": "https://github.com/PHPMailer/PHPMailer.git", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016" + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/e88da8d679acc3824ff231fdc553565b802ac016", - "reference": "e88da8d679acc3824ff231fdc553565b802ac016", + "url": "https://api.github.com/repos/PHPMailer/PHPMailer/zipball/039de174cd9c17a8389754d3b877a2ed22743e18", + "reference": "039de174cd9c17a8389754d3b877a2ed22743e18", "shasum": "" }, "require": { @@ -703,6 +703,7 @@ "yoast/phpunit-polyfills": "^1.0.4" }, "suggest": { + "decomplexity/SendOauth2": "Adapter for using XOAUTH2 authentication", "ext-mbstring": "Needed to send email in multibyte encoding charset or decode encoded addresses", "ext-openssl": "Needed for secure SMTP sending and DKIM signing", "greew/oauth2-azure-provider": "Needed for Microsoft Azure XOAUTH2 authentication", @@ -742,7 +743,7 @@ "description": "PHPMailer is a full-featured email creation and transfer class for PHP", "support": { "issues": "https://github.com/PHPMailer/PHPMailer/issues", - "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.8.1" + "source": "https://github.com/PHPMailer/PHPMailer/tree/v6.9.1" }, "funding": [ { @@ -750,7 +751,7 @@ "type": "github" } ], - "time": "2023-08-29T08:26:30+00:00" + "time": "2023-11-25T22:23:28+00:00" }, { "name": "psr/container", @@ -972,16 +973,16 @@ }, { "name": "symfony/console", - "version": "v5.4.28", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827" + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/f4f71842f24c2023b91237c72a365306f3c58827", - "reference": "f4f71842f24c2023b91237c72a365306f3c58827", + "url": "https://api.github.com/repos/symfony/console/zipball/c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", + "reference": "c70df1ffaf23a8d340bded3cfab1b86752ad6ed7", "shasum": "" }, "require": { @@ -1051,7 +1052,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/v5.4.28" + "source": "https://github.com/symfony/console/tree/v5.4.32" }, "funding": [ { @@ -1067,7 +1068,7 @@ "type": "tidelift" } ], - "time": "2023-08-07T06:12:30+00:00" + "time": "2023-11-18T18:23:04+00:00" }, { "name": "symfony/deprecation-contracts", @@ -1872,16 +1873,16 @@ }, { "name": "symfony/string", - "version": "v5.4.29", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/string.git", - "reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d" + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/string/zipball/e41bdc93def20eaf3bfc1537c4e0a2b0680a152d", - "reference": "e41bdc93def20eaf3bfc1537c4e0a2b0680a152d", + "url": "https://api.github.com/repos/symfony/string/zipball/91bf4453d65d8231688a04376c3a40efe0770f04", + "reference": "91bf4453d65d8231688a04376c3a40efe0770f04", "shasum": "" }, "require": { @@ -1938,7 +1939,7 @@ "utf8" ], "support": { - "source": "https://github.com/symfony/string/tree/v5.4.29" + "source": "https://github.com/symfony/string/tree/v5.4.32" }, "funding": [ { @@ -1954,30 +1955,31 @@ "type": "tidelift" } ], - "time": "2023-09-13T11:47:41+00:00" + "time": "2023-11-26T13:43:46+00:00" }, { "name": "twig/twig", - "version": "v3.7.1", + "version": "v3.8.0", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554" + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", - "reference": "a0ce373a0ca3bf6c64b9e3e2124aca502ba39554", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", + "reference": "9d15f0ac07f44dc4217883ec6ae02fd555c6f71d", "shasum": "" }, "require": { "php": ">=7.2.5", "symfony/polyfill-ctype": "^1.8", - "symfony/polyfill-mbstring": "^1.3" + "symfony/polyfill-mbstring": "^1.3", + "symfony/polyfill-php80": "^1.22" }, "require-dev": { "psr/container": "^1.0|^2.0", - "symfony/phpunit-bridge": "^5.4.9|^6.3" + "symfony/phpunit-bridge": "^5.4.9|^6.3|^7.0" }, "type": "library", "autoload": { @@ -2013,7 +2015,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.7.1" + "source": "https://github.com/twigphp/Twig/tree/v3.8.0" }, "funding": [ { @@ -2025,7 +2027,7 @@ "type": "tidelift" } ], - "time": "2023-08-28T11:09:02+00:00" + "time": "2023-11-21T18:54:41+00:00" }, { "name": "voku/anti-xss", @@ -2291,16 +2293,16 @@ "packages-dev": [ { "name": "composer/pcre", - "version": "3.1.0", + "version": "3.1.1", "source": { "type": "git", "url": "https://github.com/composer/pcre.git", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2" + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/pcre/zipball/4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", - "reference": "4bff79ddd77851fe3cdd11616ed3f92841ba5bd2", + "url": "https://api.github.com/repos/composer/pcre/zipball/00104306927c7a0919b4ced2aaa6782c1e61a3c9", + "reference": "00104306927c7a0919b4ced2aaa6782c1e61a3c9", "shasum": "" }, "require": { @@ -2342,7 +2344,7 @@ ], "support": { "issues": "https://github.com/composer/pcre/issues", - "source": "https://github.com/composer/pcre/tree/3.1.0" + "source": "https://github.com/composer/pcre/tree/3.1.1" }, "funding": [ { @@ -2358,7 +2360,7 @@ "type": "tidelift" } ], - "time": "2022-11-17T09:50:14+00:00" + "time": "2023-10-11T07:11:09+00:00" }, { "name": "composer/xdebug-handler", @@ -2613,23 +2615,24 @@ }, { "name": "pdepend/pdepend", - "version": "2.15.1", + "version": "2.16.0", "source": { "type": "git", "url": "https://github.com/pdepend/pdepend.git", - "reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0" + "reference": "8dfc0c46529e2073fa97986552f80646eedac562" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/d12f25bcdfb7754bea458a4a5cb159d55e9950d0", - "reference": "d12f25bcdfb7754bea458a4a5cb159d55e9950d0", + "url": "https://api.github.com/repos/pdepend/pdepend/zipball/8dfc0c46529e2073fa97986552f80646eedac562", + "reference": "8dfc0c46529e2073fa97986552f80646eedac562", "shasum": "" }, "require": { "php": ">=5.3.7", - "symfony/config": "^2.3.0|^3|^4|^5|^6.0", - "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0", - "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0" + "symfony/config": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/dependency-injection": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/filesystem": "^2.3.0|^3|^4|^5|^6.0|^7.0", + "symfony/polyfill-mbstring": "^1.19" }, "require-dev": { "easy-doc/easy-doc": "0.0.0|^1.2.3", @@ -2664,7 +2667,7 @@ ], "support": { "issues": "https://github.com/pdepend/pdepend/issues", - "source": "https://github.com/pdepend/pdepend/tree/2.15.1" + "source": "https://github.com/pdepend/pdepend/tree/2.16.0" }, "funding": [ { @@ -2672,7 +2675,7 @@ "type": "tidelift" } ], - "time": "2023-09-28T12:00:56+00:00" + "time": "2023-11-29T08:52:35+00:00" }, { "name": "phar-io/manifest", @@ -2906,7 +2909,6 @@ "type": "github" } ], - "abandoned": true, "time": "2020-12-07T05:51:20+00:00" }, { @@ -2995,16 +2997,16 @@ }, { "name": "phpstan/phpstan", - "version": "1.10.38", + "version": "1.10.46", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691" + "reference": "90d3d25c5b98b8068916bbf08ce42d5cb6c54e70" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/5302bb402c57f00fb3c2c015bac86e0827e4b691", - "reference": "5302bb402c57f00fb3c2c015bac86e0827e4b691", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/90d3d25c5b98b8068916bbf08ce42d5cb6c54e70", + "reference": "90d3d25c5b98b8068916bbf08ce42d5cb6c54e70", "shasum": "" }, "require": { @@ -3053,7 +3055,7 @@ "type": "tidelift" } ], - "time": "2023-10-06T14:19:14+00:00" + "time": "2023-11-28T14:57:26+00:00" }, { "name": "phpunit/php-code-coverage", @@ -4562,16 +4564,16 @@ }, { "name": "symfony/config", - "version": "v5.4.26", + "version": "v5.4.31", "source": { "type": "git", "url": "https://github.com/symfony/config.git", - "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650" + "reference": "dd5ea39de228813aba0c23c3a4153da2a4cf3cd9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/config/zipball/8109892f27beed9252bd1f1c1880aeb4ad842650", - "reference": "8109892f27beed9252bd1f1c1880aeb4ad842650", + "url": "https://api.github.com/repos/symfony/config/zipball/dd5ea39de228813aba0c23c3a4153da2a4cf3cd9", + "reference": "dd5ea39de228813aba0c23c3a4153da2a4cf3cd9", "shasum": "" }, "require": { @@ -4621,7 +4623,7 @@ "description": "Helps you find, load, combine, autofill and validate configuration values of any kind", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/config/tree/v5.4.26" + "source": "https://github.com/symfony/config/tree/v5.4.31" }, "funding": [ { @@ -4637,20 +4639,20 @@ "type": "tidelift" } ], - "time": "2023-07-19T20:21:11+00:00" + "time": "2023-11-09T08:22:43+00:00" }, { "name": "symfony/dependency-injection", - "version": "v5.4.29", + "version": "v5.4.32", "source": { "type": "git", "url": "https://github.com/symfony/dependency-injection.git", - "reference": "338638ed8c9d5c7fcb136a73f5c7043465ae2f05" + "reference": "d5d48f215ed73f7973d01256b9a2fac729bef759" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/338638ed8c9d5c7fcb136a73f5c7043465ae2f05", - "reference": "338638ed8c9d5c7fcb136a73f5c7043465ae2f05", + "url": "https://api.github.com/repos/symfony/dependency-injection/zipball/d5d48f215ed73f7973d01256b9a2fac729bef759", + "reference": "d5d48f215ed73f7973d01256b9a2fac729bef759", "shasum": "" }, "require": { @@ -4710,7 +4712,7 @@ "description": "Allows you to standardize and centralize the way objects are constructed in your application", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/dependency-injection/tree/v5.4.29" + "source": "https://github.com/symfony/dependency-injection/tree/v5.4.32" }, "funding": [ { @@ -4726,7 +4728,7 @@ "type": "tidelift" } ], - "time": "2023-09-20T06:23:43+00:00" + "time": "2023-11-29T06:58:28+00:00" }, { "name": "symfony/filesystem", @@ -4873,16 +4875,16 @@ }, { "name": "theseer/tokenizer", - "version": "1.2.1", + "version": "1.2.2", "source": { "type": "git", "url": "https://github.com/theseer/tokenizer.git", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", - "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/b2ad5003ca10d4ee50a12da31de12a5774ba6b96", + "reference": "b2ad5003ca10d4ee50a12da31de12a5774ba6b96", "shasum": "" }, "require": { @@ -4911,7 +4913,7 @@ "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/1.2.1" + "source": "https://github.com/theseer/tokenizer/tree/1.2.2" }, "funding": [ { @@ -4919,7 +4921,7 @@ "type": "github" } ], - "time": "2021-07-28T10:34:58+00:00" + "time": "2023-11-20T00:12:19+00:00" } ], "aliases": [], diff --git a/customer_domains.php b/customer_domains.php index af3c0068..94add191 100644 --- a/customer_domains.php +++ b/customer_domains.php @@ -72,7 +72,7 @@ if ($page == 'overview' || $page == 'domains') { } $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/domains/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/domains/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' diff --git a/customer_email.php b/customer_email.php index 0373317f..f4dc49a9 100644 --- a/customer_email.php +++ b/customer_email.php @@ -76,7 +76,7 @@ if ($page == 'overview' || $page == 'emails') { } $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/emails/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/emails/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' @@ -138,7 +138,7 @@ if ($page == 'email_domain') { ]; } $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/emails/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/emails/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' diff --git a/customer_extras.php b/customer_extras.php index 2caae923..b7e91e33 100644 --- a/customer_extras.php +++ b/customer_extras.php @@ -75,7 +75,7 @@ if ($page == 'overview' || $page == 'htpasswds') { ]; $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/extras/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/extras/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' @@ -200,7 +200,7 @@ if ($page == 'overview' || $page == 'htpasswds') { ]; $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/extras/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/extras/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' @@ -349,7 +349,7 @@ if ($page == 'overview' || $page == 'htpasswds') { $actions_links = [ [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/extras/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/extras/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' diff --git a/customer_ftp.php b/customer_ftp.php index 23255791..05521405 100644 --- a/customer_ftp.php +++ b/customer_ftp.php @@ -65,7 +65,7 @@ if ($page == 'overview' || $page == 'accounts') { ]; } $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/ftp-accounts/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/ftp-accounts/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' diff --git a/customer_mysql.php b/customer_mysql.php index 2330df7b..09f928d6 100644 --- a/customer_mysql.php +++ b/customer_mysql.php @@ -75,7 +75,7 @@ if ($page == 'overview' || $page == 'mysqls') { } $actions_links[] = [ - 'href' => 'https://docs.froxlor.org/v2/user-guide/databases/', + 'href' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/databases/', 'target' => '_blank', 'icon' => 'fa-solid fa-circle-info', 'class' => 'btn-outline-secondary' diff --git a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php index 659fb551..125c1dea 100644 --- a/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php +++ b/lib/Froxlor/Cron/Http/LetsEncrypt/AcmeSh.php @@ -26,6 +26,7 @@ namespace Froxlor\Cron\Http\LetsEncrypt; use Froxlor\Cron\FroxlorCron; +use Froxlor\Cron\TaskId; use Froxlor\Database\Database; use Froxlor\Domain\Domain; use Froxlor\FileDir; @@ -83,7 +84,7 @@ class AcmeSh extends FroxlorCron $renew_domains = self::renewDomains(true); if ($issue_froxlor || !empty($issue_domains) || !empty($renew_froxlor) || $renew_domains) { // insert task to generate certificates and vhost-configs - Cronjob::inserttask(1); + Cronjob::inserttask(TaskId::REBUILD_VHOST); } return 0; } @@ -203,7 +204,7 @@ class AcmeSh extends FroxlorCron // This is easiest done by just creating a new task ;) if ($changedetected) { if (self::$no_inserttask == false) { - Cronjob::inserttask(1); + Cronjob::inserttask(TaskId::REBUILD_VHOST); } FroxlorLogger::getInstanceOf()->logAction(FroxlorLogger::CRON_ACTION, LOG_INFO, "Let's Encrypt certificates have been updated"); } else { diff --git a/lib/Froxlor/Froxlor.php b/lib/Froxlor/Froxlor.php index 11ae8128..32193539 100644 --- a/lib/Froxlor/Froxlor.php +++ b/lib/Froxlor/Froxlor.php @@ -39,6 +39,8 @@ final class Froxlor // Distribution branding-tag (used for Debian etc.) const BRANDING = ''; + const DOCS_URL = 'https://docs.froxlor.org/v2.1/'; + /** * return path to where froxlor is installed, e.g. * /var/www/froxlor/ diff --git a/lib/Froxlor/Install/Install.php b/lib/Froxlor/Install/Install.php index 0e295b71..70bc443c 100644 --- a/lib/Froxlor/Install/Install.php +++ b/lib/Froxlor/Install/Install.php @@ -48,25 +48,31 @@ class Install public array $supportedOS = []; public array $webserverBackend = [ 'php-fpm' => 'PHP-FPM', - 'fcgid' => 'FCGID', + 'fcgid' => 'FCGID (apache2 only)', 'mod_php' => 'mod_php (not recommended)', ]; public function __construct(array $cliData = []) { + // set actual php version and extensions + $this->phpVersion = phpversion(); + $this->loadedExtensions = get_loaded_extensions(); + // get all supported OS // show list of available distro's $distros = glob(dirname(__DIR__, 3) . '/lib/configfiles/*.xml'); $distributions_select[''] = '-'; - // read in all the distros - foreach ($distros as $distribution) { - // get configparser object - $dist = new ConfigParser($distribution); - // store in tmp array - $this->supportedOS[str_replace(".xml", "", strtolower(basename($distribution)))] = $dist->getCompleteDistroName(); + if (in_array('xml', $this->loadedExtensions)) { + // read in all the distros + foreach ($distros as $distribution) { + // get configparser object + $dist = new ConfigParser($distribution); + // store in tmp array + $this->supportedOS[str_replace(".xml", "", strtolower(basename($distribution)))] = $dist->getCompleteDistroName(); + } + // sort by distribution name + asort($this->supportedOS); } - // sort by distribution name - asort($this->supportedOS); // guess distribution and webserver to preselect in formfield $webserverBackend = $this->webserverBackend; @@ -82,10 +88,6 @@ class Install $this->extendedView = $cliData['extended'] ?? Request::any('extended', 0); $this->maxSteps = count($this->formfield['install']['sections']); - // set actual php version and extensions - $this->phpVersion = phpversion(); - $this->loadedExtensions = get_loaded_extensions(); - if (empty($cliData)) { // set global variables UI::twig()->addGlobal('install_mode', true); diff --git a/lib/Froxlor/Install/Requirements.php b/lib/Froxlor/Install/Requirements.php index 6d45b8a3..f1645269 100644 --- a/lib/Froxlor/Install/Requirements.php +++ b/lib/Froxlor/Install/Requirements.php @@ -5,6 +5,6 @@ namespace Froxlor\Install; class Requirements { const REQUIRED_VERSION = '7.4.0'; - const REQUIRED_EXTENSIONS = ['session', 'ctype', 'xml', 'filter', 'posix', 'mbstring', 'curl', 'gmp', 'json', 'gd']; + const REQUIRED_EXTENSIONS = ['session', 'ctype', 'xml', 'filter', 'posix', 'mbstring', 'pdo_mysql', 'curl', 'gmp', 'json', 'gd']; const SUGGESTED_EXTENSIONS = ['bcmath', 'zip', 'gnupg']; } diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index aa2c8624..08b63583 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -161,13 +161,13 @@ return [ 'show_element' => (!Settings::IsInList('panel.customer_hide_options', 'misc.documentation')), 'elements' => [ [ - 'url' => 'https://docs.froxlor.org/v2/user-guide/', + 'url' => \Froxlor\Froxlor::DOCS_URL . 'user-guide/', 'label' => lng('admin.userguide'), 'new_window' => true, 'is_external' => true, ], [ - 'url' => 'https://docs.froxlor.org/v2/api-guide/', + 'url' => \Froxlor\Froxlor::DOCS_URL . 'api-guide/', 'label' => lng('admin.apiguide'), 'new_window' => true, 'show_element' => Settings::Get('api.enabled') == 1 && CurrentUser::getField('api_allowed') == 1, @@ -348,13 +348,13 @@ return [ 'icon' => 'fa-solid fa-circle-info', 'elements' => [ [ - 'url' => 'https://docs.froxlor.org/v2/admin-guide/', + 'url' => \Froxlor\Froxlor::DOCS_URL . 'admin-guide/', 'label' => lng('admin.adminguide'), 'new_window' => true, 'is_external' => true, ], [ - 'url' => 'https://docs.froxlor.org/v2/api-guide/', + 'url' => \Froxlor\Froxlor::DOCS_URL . 'api-guide/', 'label' => lng('admin.apiguide'), 'new_window' => true, 'show_element' => Settings::Get('api.enabled') == 1, diff --git a/lng/de.lng.php b/lng/de.lng.php index c5eebc92..01203907 100644 --- a/lng/de.lng.php +++ b/lng/de.lng.php @@ -2243,7 +2243,7 @@ Vielen Dank, Ihr Administrator', 'database' => [ 'top' => 'Datenbank', 'title' => 'Datenbank und Benutzer erstellen', - 'description' => 'Froxlor benötigt eine Datenbank und zusätzlich einen Benutzer mit privilegierten Rechten, welcher Benutzer und Datenbanken erstellen darf (GRANT Option). Die angegebene Datenbank und der unprivilegierte Benutzer werden automatisch in diesem Prozess erstellt. Der privilegierte Benutzer muss existieren.', + 'description' => 'Froxlor benötigt eine Datenbank und zusätzlich einen Benutzer mit privilegierten Rechten, welcher Benutzer und Datenbanken erstellen darf (GRANT Option). Die angegebene Datenbank und der unprivilegierte Benutzer werden automatisch in diesem Prozess erstellt. Der privilegierte Benutzer muss existieren.', 'user' => 'Unprivilegierter Datenbank Benutzer', 'dbname' => 'Datenbank Name', 'force_create' => 'Sichern und überschreiben, sofern Datenbank existiert?', diff --git a/lng/en.lng.php b/lng/en.lng.php index d802a14b..7f4eaf27 100644 --- a/lng/en.lng.php +++ b/lng/en.lng.php @@ -2379,7 +2379,7 @@ Yours sincerely, your administrator', 'database' => [ 'top' => 'Database', 'title' => 'Create database and user', - 'description' => 'Froxlor requires a database and additionally a privileged user to be able to create users and databases (GRANT option). The given database and unprivileged database-user will be created in this process. The privileged user must exist.', + 'description' => 'Froxlor requires a database and additionally a privileged user to be able to create users and databases (GRANT option). The given database and unprivileged database-user will be created in this process. The privileged user must exist.', 'user' => 'Unprivileged database user', 'dbname' => 'Database name', 'force_create' => 'Backup and overwrite database if exists?',