Hi.
At first sight it seems that the call to the function organizeButtonsEnd() in objectButtns is inside the if ($mailable and $mailable->id) ;
but I believe it must be called in any case, as the organizeButtons() sequence is alredy started. Please check.
In my version I created function fro each button ( e.g. function drawMultiUpdateButton($objectClass, $objectClassi18n, $noselect) ) so the code appears more readable, like
....
//$displayButton=( $buttonCheckListVisible=="visible")?'void':'none';
if ($buttonCheckListVisible == "visible" and $obj->id) {
$this->organizeButtons($obj);
}
$this->drawCheckListButton($objectClass, $buttonCheckListVisible);
$paramHistoryVisible = Parameter::getUserParameter('displayHistory');
if ($paramHistoryVisible == 'REQ' and $obj->id) {
$this->organizeButtons($obj);
}
$this->drawHistoryButton($objectClass, $objectId, $paramHistoryVisible);
}
$this->organizeButtonsEnd();
....
Best regards
You're right,
In fact, it is the closure for test "if ($mailable and $mailable->id" that is much to far.
In encloses several buttons that should be displayed even if not mailable (history, checklist, ...)
Thanks for reporting.