Fix: The hook addCalendarChoice was only visible into tabs index.php

This commit is contained in:
Laurent Destailleur 2015-07-21 12:19:21 +02:00
parent 38d30b5590
commit 977d2d3463
2 changed files with 31 additions and 4 deletions

View File

@ -254,8 +254,22 @@ if ($resql)
}
*/
print_barre_liste($newtitle, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, 0, '', 0, $nav);
//print '<br>';
$s=$newtitle;
// Calendars from hooks
$parameters=array(); $object=null;
$reshook=$hookmanager->executeHooks('addCalendarChoice',$parameters,$object,$action);
if (empty($reshook))
{
$s.= $hookmanager->resPrint;
}
elseif ($reshook > 1)
{
$s = $hookmanager->resPrint;
}
print_barre_liste($s, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $link, $num, 0, '', 0, $nav);
print '<form method="POST" id="searchFormList" action="'.$_SERVER["PHP_SELF"].'?'.$param.'">'."\n";

View File

@ -317,14 +317,27 @@ if ($conf->use_javascript_ajax)
$s.='<div class="nowrap float"><input type="checkbox" id="check_ext' . $htmlname . '" name="check_ext' . $htmlname . '" checked> ' . $val ['name'] . ' &nbsp; </div>';
}
}
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' &nbsp; </div>';
// Calendars from hooks
$parameters=array(); $object=null;
$reshook=$hookmanager->executeHooks('addCalendarChoice',$parameters,$object,$action);
if (empty($reshook))
{
$s.= $hookmanager->resPrint;
}
elseif ($reshook > 1)
{
$s = $hookmanager->resPrint;
}
}
//$s.='<div class="nowrap float"><input type="checkbox" id="check_birthday" name="check_birthday"> '.$langs->trans("AgendaShowBirthdayEvents").' &nbsp; </div>';
}
$link='';
print_fiche_titre($s,$link.' &nbsp; &nbsp; '.$nav, '');
print_fiche_titre($s, $link.' &nbsp; &nbsp; '.$nav, '');
// Get event in an array