diff --git a/htdocs/core/search.php b/htdocs/core/search.php index 17a584601bd..41140f8b031 100644 --- a/htdocs/core/search.php +++ b/htdocs/core/search.php @@ -20,13 +20,11 @@ */ /** - * \file htdocs/core/search.php - * \brief Wrapper that receive any search. Depending on input field, make a redirect to correct URL. + * \file htdocs/core/search.php + * \brief Wrapper that receive any search. Depending on input field, make a redirect to correct URL. + * This page is called by search forms when MAIN_SEARCH_FORM_ON_HOME_AREAS is set or from user area. */ -if (!defined('NOREQUIREUSER')) { - define('NOREQUIREUSER', '1'); -} if (!defined('NOREQUIREDB')) { define('NOREQUIREDB', '1'); } @@ -42,9 +40,6 @@ if (!defined('NOCSRFCHECK')) { if (!defined('NOTOKENRENEWAL')) { define('NOTOKENRENEWAL', 1); } -if (!defined('NOLOGIN')) { - define('NOLOGIN', 1); -} if (!defined('NOREQUIREMENU')) { define('NOREQUIREMENU', 1); } @@ -146,11 +141,5 @@ if (GETPOST('search_group') != '') { } - // If we are here, search was called with no supported criteria -if (!empty($_SERVER['HTTP_REFERER'])) { - header("Location: ".$_SERVER['HTTP_REFERER']); - exit; -} else { - print 'The wrapper search.php was called without any search criteria'; -} +print 'The wrapper search.php was called without any search criteria'; diff --git a/htdocs/core/search_page.php b/htdocs/core/search_page.php index dc1cc0badbd..994cf602e94 100644 --- a/htdocs/core/search_page.php +++ b/htdocs/core/search_page.php @@ -50,6 +50,8 @@ require_once '../main.inc.php'; * @var HookManager $hookmanager * @var Translate $langs * @var User $user + * + * @var string $dolibarr_nocache */ if (GETPOST('lang', 'aZ09')) { @@ -176,7 +178,7 @@ $searchform .= '
'; // Add search on URL -if ($conf->dol_use_jmobile) { +if (!empty($conf->dol_use_jmobile) || 1) { $ret = ''; $ret .= '
'; $ret .= '';