mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Fix: hooks for leftmenu must not be loaded if left menu hidden, also
hooks were lost into page search_page.
This commit is contained in:
parent
66e0f80aa2
commit
bd8271ee24
|
|
@ -61,8 +61,12 @@ print '<div>';
|
|||
|
||||
$nbofsearch=0;
|
||||
|
||||
// Instantiate hooks of thirdparty module
|
||||
$hookmanager->initHooks(array('searchform'));
|
||||
|
||||
// Define $searchform
|
||||
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||
// TODO Mutualize code here with function left_menu into main.inc.php page
|
||||
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname');
|
||||
|
|
|
|||
|
|
@ -1479,18 +1479,18 @@ function left_menu($menu_array_before, $helppagename='', $moresearchform='', $me
|
|||
$searchform='';
|
||||
$bookmarks='';
|
||||
|
||||
// Instantiate hooks of thirdparty module
|
||||
$hookmanager->initHooks(array('searchform','leftblock'));
|
||||
|
||||
if (empty($conf->dol_hide_leftmenu))
|
||||
{
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
||||
// Instantiate hooks of thirdparty module
|
||||
$hookmanager->initHooks(array('searchform','leftblock'));
|
||||
|
||||
if (! empty($conf->use_javascript_ajax) && ! empty($conf->global->MAIN_MENU_USE_JQUERY_LAYOUT)) print "\n".'<div class="ui-layout-west"> <!-- Begin left layout -->'."\n";
|
||||
else print '<div id="id-left">';
|
||||
|
||||
print "\n";
|
||||
|
||||
// Define $searchform
|
||||
if (! empty($conf->societe->enabled) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||
if ((( ! empty($conf->societe->enabled) && (empty($conf->global->SOCIETE_DISABLE_PROSPECTS) || empty($conf->global->SOCIETE_DISABLE_CUSTOMERS))) || ! empty($conf->fournisseur->enabled)) && ! empty($conf->global->MAIN_SEARCHFORM_SOCIETE) && $user->rights->societe->lire)
|
||||
{
|
||||
$langs->load("companies");
|
||||
$searchform.=printSearchForm(DOL_URL_ROOT.'/societe/societe.php', DOL_URL_ROOT.'/societe/societe.php', img_object('','company').' '.$langs->trans("ThirdParties"), 'soc', 'socname');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user