Merge pull request #1219 from jygaulier/PHRAS-271

fix #PHRAS-343
This commit is contained in:
Nicolas Le Goff
2015-01-28 14:56:42 +01:00
2 changed files with 9 additions and 6 deletions

View File

@@ -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();

View File

@@ -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();
}
});