diff --git a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php index 72a5b6563c..acb05fd15d 100644 --- a/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php +++ b/lib/Alchemy/Phrasea/SearchEngine/SearchEngineOptions.php @@ -653,11 +653,14 @@ class SearchEngineOptions } $bas = array_filter($bas, function ($collection) use ($app) { - if ($app['authentication']->isAuthenticated()) { - return $app['authentication']->getUser()->ACL()->has_access_to_base($collection->get_base_id()); - } else { - return in_array($collection, $app->getOpenCollections()); + if($collection !== null) { + if ($app['authentication']->isAuthenticated()) { + return $app['authentication']->getUser()->ACL()->has_access_to_base($collection->get_base_id()); + } else { + return in_array($collection, $app->getOpenCollections()); + } } + return false; // CollectionNotFound }); $databoxes = array(); diff --git a/www/skins/prod/jquery.main-prod.js b/www/skins/prod/jquery.main-prod.js index 25a2689b88..b9bf5937fa 100644 --- a/www/skins/prod/jquery.main-prod.js +++ b/www/skins/prod/jquery.main-prod.js @@ -760,9 +760,9 @@ $(document).ready(function () { var $this = $(this); var $record_types = $('#recordtype_sel'); if ($this.hasClass('mode_type_reg')) { - $record_types.attr('disabled', true); + $record_types.hide(); } else { - $record_types.removeAttr('disabled'); + $record_types.show(); } });