diff --git a/lib/Alchemy/Phrasea/Helper/Prod.php b/lib/Alchemy/Phrasea/Helper/Prod.php index c2af5cde9f..80e0413b11 100644 --- a/lib/Alchemy/Phrasea/Helper/Prod.php +++ b/lib/Alchemy/Phrasea/Helper/Prod.php @@ -34,6 +34,7 @@ class Prod extends Helper } $searchSet = json_decode($this->app['authentication']->getUser()->getPrefs('search'), true); + $saveSettings = $this->app['authentication']->getUser()->getPrefs('advanced_search_reload'); foreach ($this->app['authentication']->getUser()->ACL()->get_granted_sbas() as $databox) { $sbas_id = $databox->get_sbas_id(); @@ -46,8 +47,7 @@ class Prod extends Helper ); foreach ($this->app['authentication']->getUser()->ACL()->get_granted_base(array(), array($databox->get_sbas_id())) as $coll) { - $selected = (isset($searchSet['bases']) && - isset($searchSet['bases'][$sbas_id])) ? (in_array($coll->get_base_id(), $searchSet['bases'][$sbas_id])) : true; + $selected = $saveSettings ? ((isset($searchSet['bases']) && isset($searchSet['bases'][$sbas_id])) ? (in_array($coll->get_base_id(), $searchSet['bases'][$sbas_id])) : true) : true; $bases[$sbas_id]['collections'][] = array( 'selected' => $selected, diff --git a/lib/classes/User/Adapter.php b/lib/classes/User/Adapter.php index 32c0f58fef..57df9f27a5 100644 --- a/lib/classes/User/Adapter.php +++ b/lib/classes/User/Adapter.php @@ -82,6 +82,7 @@ class User_Adapter implements User_Interface, cache_cacheableInterface 'warning_on_delete_story' => 'true', 'client_basket_status' => '1', 'css' => '000000', + 'advanced_search_reload' => '1', 'start_page_query' => 'last', 'start_page' => 'QUERY', 'rollover_thumbnail' => 'caption', diff --git a/templates/web/prod/index.html.twig b/templates/web/prod/index.html.twig index 3ec6c17538..129a44bd80 100644 --- a/templates/web/prod/index.html.twig +++ b/templates/web/prod/index.html.twig @@ -798,6 +798,15 @@
  • {% trans 'Configuration' %}
  • +
    +
    + {% set mod = app['authentication'].getUser().getPrefs('advanced_search_reload') %} + +
    +

    {% trans 'Mode de presentation' %}