refactoring

This commit is contained in:
Roland Gruber 2023-10-30 20:37:40 +01:00
parent ccf0fa6308
commit c997d79be9
2 changed files with 8 additions and 8 deletions

View file

@ -147,14 +147,14 @@ function printImportTabContent(): void {
$sourceRadio = new htmlResponsiveRadio(_('Source'), 'source', $sources, 'text'); $sourceRadio = new htmlResponsiveRadio(_('Source'), 'source', $sources, 'text');
$sourceRadio->setTableRowsToHide( $sourceRadio->setTableRowsToHide(
[ [
'file' => array('text'), 'file' => ['text'],
'text' => array('file') 'text' => ['file']
] ]
); );
$sourceRadio->setTableRowsToShow( $sourceRadio->setTableRowsToShow(
[ [
'text' => array('text'), 'text' => ['text'],
'file' => array('file') 'file' => ['file']
] ]
); );
$container->add($sourceRadio, 12); $container->add($sourceRadio, 12);
@ -272,7 +272,7 @@ function printExportTabContent(): void {
_('One (one level beneath base)') => 'one', _('One (one level beneath base)') => 'one',
_('Sub (entire subtree)') => 'sub' _('Sub (entire subtree)') => 'sub'
]; ];
$searchScopeSelect = new htmlResponsiveSelect('searchScope', $searchScopes, array('sub'), _('Search scope')); $searchScopeSelect = new htmlResponsiveSelect('searchScope', $searchScopes, ['sub'], _('Search scope'));
$searchScopeSelect->setHasDescriptiveElements(true); $searchScopeSelect->setHasDescriptiveElements(true);
$searchScopeSelect->setSortElements(false); $searchScopeSelect->setSortElements(false);
$container->add($searchScopeSelect, 12); $container->add($searchScopeSelect, 12);
@ -285,7 +285,7 @@ function printExportTabContent(): void {
'CSV' => 'csv', 'CSV' => 'csv',
'LDIF' => 'ldif' 'LDIF' => 'ldif'
]; ];
$formatSelect = new htmlResponsiveSelect('format', $formats, array('ldif'), _('Export format')); $formatSelect = new htmlResponsiveSelect('format', $formats, ['ldif'], _('Export format'));
$formatSelect->setHasDescriptiveElements(true); $formatSelect->setHasDescriptiveElements(true);
$formatSelect->setSortElements(false); $formatSelect->setSortElements(false);
$container->add($formatSelect, 12); $container->add($formatSelect, 12);
@ -294,7 +294,7 @@ function printExportTabContent(): void {
'Windows' => 'windows', 'Windows' => 'windows',
'Unix' => 'unix' 'Unix' => 'unix'
]; ];
$endingsSelect = new htmlResponsiveSelect('ending', $endings, array('unix'), _('End of line')); $endingsSelect = new htmlResponsiveSelect('ending', $endings, ['unix'], _('End of line'));
$endingsSelect->setHasDescriptiveElements(true); $endingsSelect->setHasDescriptiveElements(true);
$endingsSelect->setSortElements(false); $endingsSelect->setSortElements(false);
$container->add($endingsSelect, 12); $container->add($endingsSelect, 12);

View file

@ -104,7 +104,7 @@ else {
_('Last use'), _('Last use'),
_('Delete') _('Delete')
]; ];
$data = array(); $data = [];
$id = 0; $id = 0;
foreach ($results as $result) { foreach ($results as $result) {
$credentialId = $result['credentialId']; $credentialId = $result['credentialId'];