Forum

Misplaced organizeB...
 
Notifications
Retirer tout

Misplaced organizeButtonsEnd() call

2 Posts
2 Utilisateurs
0 Reactions
2,266 Vu
(@antonio-grr)
Posts: 84
Active Member
Début du sujet
 
[#4352]

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


 
Posté : 16 Mai AM 10:055
(@babynus)
Posts: 14952
Membre Admin
 

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.


 
Posté : 17 Mai AM 11:055
Share:
Retour en haut