From e218a84527e269f9f5348c65ddaca869cc2e4fb0 Mon Sep 17 00:00:00 2001 From: Romain Neutron Date: Fri, 17 Feb 2012 16:19:26 +0100 Subject: [PATCH] Fix publi caption --- lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php | 9 ++++++--- templates/web/common/caption.html | 2 ++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php index f4e563777a..fa8128f7d6 100644 --- a/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php +++ b/lib/Alchemy/Phrasea/Controller/Prod/Tooltip.php @@ -103,10 +103,13 @@ class Tooltip implements ControllerProviderInterface $search_engine = null; - if (($search_engine_options = unserialize($app['request']->get('options_serial'))) !== false) + if($view == 'answer') { - $search_engine = new \searchEngine_adapter($app['appbox']->get_registry()); - $search_engine->set_options($search_engine_options); + if (($search_engine_options = unserialize($app['request']->get('options_serial'))) !== false) + { + $search_engine = new \searchEngine_adapter($app['appbox']->get_registry()); + $search_engine->set_options($search_engine_options); + } } /* @var $twig \Twig_Environment */ diff --git a/templates/web/common/caption.html b/templates/web/common/caption.html index 4139c808b7..3072f0e649 100644 --- a/templates/web/common/caption.html +++ b/templates/web/common/caption.html @@ -15,4 +15,6 @@ {{cap_bas.format_caption(record, highlight|default(''), searchEngine|default(null))}} {% elseif view == 'overview' %} {{cap_ovr.format_caption(record, highlight|default(''), searchEngine|default(null))}} +{% elseif view == 'publi' %} + {{cap_pub.format_caption(record, '', null)}} {% endif %} \ No newline at end of file