check for existing fields when setting/updating tablelisting-columns

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2023-02-14 11:36:11 +01:00
parent 89843d6f37
commit 4003a8d2b6
6 changed files with 37 additions and 7 deletions

View File

@@ -29,11 +29,14 @@ use Froxlor\UI\Callbacks\Style;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing;
// used outside scope variables
$customerCollectionCount = !is_null($customerCollection ?? null) ? $customerCollection->count() : 0;
return [
'domain_list' => [
'title' => lng('admin.domains'),
'icon' => 'fa-solid fa-globe',
'empty_msg' => $customerCollection->count() == 0 ? lng('admin.domain_nocustomeraddingavailable') : '',
'empty_msg' => $customerCollectionCount == 0 ? lng('admin.domain_nocustomeraddingavailable') : '',
'self_overview' => ['section' => 'domains', 'page' => 'domains'],
'default_sorting' => ['d.domain_ace' => 'asc'],
'columns' => [

View File

@@ -27,6 +27,9 @@ use Froxlor\UI\Callbacks\Ftp;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing;
// used outside scope variables
$cperlenabled = $cperlenabled ?? false;
return [
'htaccess_list' => [
'title' => lng('menue.extras.pathoptions'),

View File

@@ -27,6 +27,9 @@ use Froxlor\UI\Callbacks\Mysql;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing;
// used outside scope variables
$multiple_mysqlservers = $multiple_mysqlservers ?? false;
return [
'mysql_list' => [
'title' => lng('menue.mysql.databases'),

View File

@@ -27,6 +27,10 @@ use Froxlor\UI\Callbacks\Dns;
use Froxlor\UI\Callbacks\Text;
use Froxlor\UI\Listing;
// used outside scope variables
$domain = $domain ?? '';
$domain_id = $domain_id ?? '';
return [
'dns_list' => [
'title' => 'DNS Entries',