Hello,
I try to overload the project_timesheet_prepare_head
-Function from core/lib/project.lib.php so set a YearView left to the Month-View:
<?php
function project_timesheet_prepare_head($mode, $usertoprocess)
{
global $langs;
$head = array();
$h = 0;
// Day
$head[$h][0] = dol_buildpath("/projet/activity/perday.php", 1)."?id=".$usertoprocess;
$head[$h][1] = $langs->trans("Day");
$head[$h][2] = 'inputperday';
$h++;
// Week
$head[$h][0] = dol_buildpath("/projet/activity/perweek.php", 1)."?id=".$usertoprocess;
$head[$h][1] = $langs->trans("Week");
$head[$h][2] = 'inputperweek';
$h++;
// Month
$head[$h][0] = dol_buildpath("/projet/activity/permonth.php", 1)."?id=".$usertoprocess;
$head[$h][1] = $langs->trans("Month");
$head[$h][2] = 'inputpermonth';
$h++;
// Year (neu)
$head[$h][0] = dol_buildpath("/custom/winzig/peryear.php", 1)."?id=".$usertoprocess;
$head[$h][1] = $langs->trans("Year");
$head[$h][2] = 'inputperyear';
$h++;
return $head;
}
In my module-Class I’ve added:
$this->module_parts = array(
'hooks' => array(
'contactlist',
'thirdpartylist'
),
'overload' => array(
'core/lib/project.lib.php' => 'winzig/lib/project.lib.php'
)
);
But the Overload don’t work.
Am I using it correct?