From 2cf1a45a5bd73a2219444cfbfc05c77cf784da03 Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Tue, 27 Jan 2015 18:33:32 +0100 Subject: [PATCH 1/2] fix #PHRAS-343 #time 20m --- www/skins/prod/jquery.main-prod.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); } }); From 39c53421ad4d81b6e56d057a3eca659a09ec910b Mon Sep 17 00:00:00 2001 From: Jean-Yves Gaulier Date: Wed, 28 Jan 2015 14:05:01 +0100 Subject: [PATCH 2/2] #PHRAS-271 #time 1h --- .../Phrasea/SearchEngine/SearchEngineOptions.php | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) 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();