diff --git a/components/ILIAS/Bibliographic/classes/Admin/Library/class.ilBiblLibraryGUI.php b/components/ILIAS/Bibliographic/classes/Admin/Library/class.ilBiblLibraryGUI.php index 488367ad7259..b431306ecee7 100755 --- a/components/ILIAS/Bibliographic/classes/Admin/Library/class.ilBiblLibraryGUI.php +++ b/components/ILIAS/Bibliographic/classes/Admin/Library/class.ilBiblLibraryGUI.php @@ -58,7 +58,7 @@ public function __construct(protected \ilBiblAdminLibraryFacadeInterface $facade */ public function executeCommand(): void { - if ($this->ctrl()->getNextClass() === null) { + if ($this->ctrl()->getNextClass() === null || $this->ctrl()->getNextClass() === '') { $cmd = $this->ctrl()->getCmd(self::CMD_INDEX); $this->{$cmd}(); } diff --git a/components/ILIAS/Bibliographic/classes/Field/DataRetrieval.php b/components/ILIAS/Bibliographic/classes/Field/DataRetrieval.php index d24acc060ca9..ced9a08d1538 100755 --- a/components/ILIAS/Bibliographic/classes/Field/DataRetrieval.php +++ b/components/ILIAS/Bibliographic/classes/Field/DataRetrieval.php @@ -42,24 +42,26 @@ public function getRows( OrderingRowBuilder $row_builder, array $visible_column_ids, ): \Generator { - $records = $this->getRecords($order); + $records = $this->getRecords(); foreach ($records as $idx => $record) { $row_id = (string) $record['id']; $field = $this->facade->fieldFactory()->findById($record['id']); $record['data_type'] = $this->facade->translationFactory()->translate($field); $record['is_standard_field'] = $field->isStandardField() ? $this->lng->txt('standard') : $this->lng->txt('custom'); - yield $row_builder->buildDataRow($row_id, $record) + yield $row_builder->buildOrderingRow($row_id, $record) ->withDisabledAction('translate', !$this->has_write_access); } } - protected function getRecords(Order $order): array + protected function getRecords(?Order $order = null): array { $records = $this->facade->fieldFactory()->filterAllFieldsForTypeAsArray($this->facade->type()); - [$order_field, $order_direction] = $order->join([], fn($ret, $key, $value): array => [$key, $value]); - usort($records, fn($a, $b): int => $a[$order_field] <=> $b[$order_field]); - if ($order_direction === 'DESC') { - return array_reverse($records); + if (!is_null($order)) { + [$order_field, $order_direction] = $order->join([], fn($ret, $key, $value): array => [$key, $value]); + usort($records, fn($a, $b): int => $a[$order_field] <=> $b[$order_field]); + if ($order_direction === 'DESC') { + return array_reverse($records); + } } return $records; } diff --git a/components/ILIAS/Bibliographic/classes/Field/Table.php b/components/ILIAS/Bibliographic/classes/Field/Table.php index f31218ae0a6a..c13afd9317e5 100755 --- a/components/ILIAS/Bibliographic/classes/Field/Table.php +++ b/components/ILIAS/Bibliographic/classes/Field/Table.php @@ -67,11 +67,11 @@ public function __construct( $this->components[] = $this->table = $this->ui_factory->table()->ordering( $data_retrieval, - $this->lng->txt('filter'), - $columns, new URI( ILIAS_HTTP_PATH . "/" . $this->ctrl->getLinkTarget($this->calling_gui, \ilBiblAdminFieldGUI::CMD_SAVE_ORDERING) - ) + ), + $this->lng->txt('filter'), + $columns, )->withActions($actions)->withRequest( $DIC->http()->request() ); diff --git a/components/ILIAS/Bibliographic/classes/class.ilObjBibliographicGUI.php b/components/ILIAS/Bibliographic/classes/class.ilObjBibliographicGUI.php index abc8fe4a05a7..45cf902bff78 100755 --- a/components/ILIAS/Bibliographic/classes/class.ilObjBibliographicGUI.php +++ b/components/ILIAS/Bibliographic/classes/class.ilObjBibliographicGUI.php @@ -485,10 +485,7 @@ protected function getReplaceBibliographicFileForm(): Standard $rid = $bibl_obj->getResourceId() ? $bibl_obj->getResourceId()->serialize() : ""; $bibl_upload_handler = new ilObjBibliographicUploadHandlerGUI($rid); - $max_filesize_bytes = $this->upload_limit->getPhpUploadLimitInBytes(); - $max_filesize_mb = round($max_filesize_bytes / 1024 / 1024, 1); - $info_file_limitations = $this->lng->txt('file_notice') . " " . number_format($max_filesize_mb, 1) . " MB
" - . $this->lng->txt('file_allowed_suffixes') . " .bib, .bibtex, .ris"; + $info_file_limitations = $this->lng->txt('file_allowed_suffixes') . " .bib, .bibtex, .ris"; $section_replace_bibliographic_file = $this->ui_factory ->input() ->field() @@ -502,7 +499,6 @@ protected function getReplaceBibliographicFileForm(): Standard $this->lng->txt('bibliography_file'), $info_file_limitations ) - ->withMaxFileSize($max_filesize_bytes) ->withRequired(true) ->withAdditionalTransformation( $this->getValidBiblFileSuffixConstraint()