Regis, I revert the commit you did about change into hook management to use resPrint to return value.
There is no need for this. Hooks for pdf_xxx are already hooks of type "returnvalue". This means, if you want your hook to return a specific value to replace data return, you must return your value into your hook with return $myvalue. resPrint is a property to use to print something into output, that is different than a function returning a value. Goal is to start to clean and uniformize way of working of triggers. There was at least 6 ways of working, with 3.4, we should keep only 2 types "returnvalue" and "addreplace". With a future version, only "addreplace" type will be kept: return code will be 1 or 0 (replace standard code or not) and to return data, hook will set ->result property and to ouput data to screen will set ->resprint. This means this will break compatibility with old modules, but it is better to have modules to change to match good practices after a dolibarr upgrade to a new version than keeping bad code into dolibarr to match bad practices. More information on how trigger will works: http://wiki.dolibarr.org/index.php/Hooks_system -- Eldy (Laurent Destailleur). EMail: e...@destailleur.fr Web: http://www.destailleur.fr Dolibarr (Project leader): http://www.dolibarr.org To make a donation for Dolibarr project via Paypal: cont...@destailleur.fr AWStats (Author) : http://awstats.sourceforge.net To make a donation for AWStats project via Paypal: cont...@destailleur.fr AWBot (Author) : http://awbot.sourceforge.net CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net
_______________________________________________ Dolibarr-dev mailing list Dolibarr-dev@nongnu.org https://lists.nongnu.org/mailman/listinfo/dolibarr-dev