diff --git a/lib/Froxlor/UI/Callbacks/Domain.php b/lib/Froxlor/UI/Callbacks/Domain.php index d56c83d6..d476db9b 100644 --- a/lib/Froxlor/UI/Callbacks/Domain.php +++ b/lib/Froxlor/UI/Callbacks/Domain.php @@ -25,6 +25,7 @@ namespace Froxlor\UI\Callbacks; +use Froxlor\Database\Database; use Froxlor\Domain\Domain as DDomain; use Froxlor\FileDir; use Froxlor\Settings; @@ -79,11 +80,11 @@ class Domain { $result = ''; if ($attributes['fields']['parentdomainid'] != 0) { - $result = ''; + $result = ''; } $result .= '' . $attributes['data'] . ''; // check for statistics if parentdomainid==0 to show stats-link for customers - if ((int)UI::getCurrentUser()['adminsession'] == 0 && $attributes['fields']['parentdomainid'] == 0 && $attributes['fields']['deactivated'] == 0) { + if ((int)UI::getCurrentUser()['adminsession'] == 0 && $attributes['fields']['parentdomainid'] == 0 && $attributes['fields']['deactivated'] == 0) { $statsapp = Settings::Get('system.traffictool'); $result .= ' '; } @@ -189,13 +190,11 @@ class Domain // specified certificate for domain if ($attributes['fields']['domain_hascert'] == 1) { $result['icon'] .= ' text-success'; - } - // shared certificates (e.g. subdomain if domain where certificate is specified) + } // shared certificates (e.g. subdomain if domain where certificate is specified) elseif ($attributes['fields']['domain_hascert'] == 2) { $result['icon'] .= ' text-warning'; $result['title'] .= "\n" . lng('panel.ssleditor_infoshared'); - } - // no certificate specified, using global fallbacks (IPs and Ports or if empty SSL settings) + } // no certificate specified, using global fallbacks (IPs and Ports or if empty SSL settings) elseif ($attributes['fields']['domain_hascert'] == 0) { $result['icon'] .= ' text-danger'; $result['title'] .= "\n" . lng('panel.ssleditor_infoglobal'); @@ -217,4 +216,22 @@ class Domain } return lng('panel.empty'); } + + public static function getPhpConfigName(array $attributes): string + { + $sel_stmt = Database::prepare("SELECT `description` FROM `" . TABLE_PANEL_PHPCONFIGS . "` WHERE `id` = :id"); + $phpconfig = Database::pexecute_first($sel_stmt, ['id' => $attributes['data']]); + if ((int)UI::getCurrentUser()['adminsession'] == 1) { + $linker = UI::getLinker(); + $result = '' . $phpconfig['description'] . ''; + } else { + $result = $phpconfig['description']; + } + return $result; + } } diff --git a/lib/navigation/00.froxlor.main.php b/lib/navigation/00.froxlor.main.php index 012308e0..e27c22b1 100644 --- a/lib/navigation/00.froxlor.main.php +++ b/lib/navigation/00.froxlor.main.php @@ -223,12 +223,6 @@ return [ 'required_resources' => 'customers', 'add_shortlink' => 'admin_plans.php?page=overview&action=add' ], - [ - 'url' => 'admin_backups.php?page=overview', - 'label' => lng('admin.backups.backups'), - 'required_resources' => 'change_serversettings', - 'add_shortlink' => 'admin_backups.php?page=overview&action=add' - ], [ 'url' => 'admin_settings.php?page=updatecounters', 'label' => lng('admin.updatecounters'), @@ -268,6 +262,12 @@ return [ 'label' => lng('admin.cron.cronsettings'), 'required_resources' => 'change_serversettings' ], + [ + 'url' => 'admin_backups.php?page=overview', + 'label' => lng('admin.backups.backups'), + 'required_resources' => 'change_serversettings', + 'add_shortlink' => 'admin_backups.php?page=overview&action=add' + ], [ 'url' => 'admin_logger.php?page=log', 'label' => lng('menue.logger.logger'), diff --git a/lib/tablelisting/admin/tablelisting.domains.php b/lib/tablelisting/admin/tablelisting.domains.php index 3c484e11..a5f578ee 100644 --- a/lib/tablelisting/admin/tablelisting.domains.php +++ b/lib/tablelisting/admin/tablelisting.domains.php @@ -23,6 +23,7 @@ * @license https://files.froxlor.org/misc/COPYING.txt GPLv2 */ +use Froxlor\Settings; use Froxlor\UI\Callbacks\Domain; use Froxlor\UI\Callbacks\Impersonate; use Froxlor\UI\Callbacks\Style; @@ -114,6 +115,13 @@ return [ 'field' => 'phpenabled', 'callback' => [Text::class, 'boolean'], ], + 'd.phpsettingid' => [ + 'label' => lng('admin.phpsettings.title'), + 'field' => 'phpsettingid', + 'searchable' => false, + 'callback' => [Domain::class, 'getPhpConfigName'], + 'visible' => (int)Settings::Get('system.mod_fcgid') == 1 || (int)Settings::Get('phpfpm.enabled') == 1 + ], 'd.openbasedir' => [ 'label' => lng('domains.openbasedirenabled'), 'field' => 'openbasedir',