[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Dolibarr-dev] Revert of commit

From: Régis Houssin
Subject: Re: [Dolibarr-dev] Revert of commit
Date: Tue, 11 Jun 2013 08:37:18 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6


so he must be the "revert" on Develop branch no?

Le 11/06/13 00:24, Laurent Destailleur (eldy) a écrit :

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:

Eldy (Laurent Destailleur).

EMail: address@hidden

Dolibarr (Project leader):
To make a donation for Dolibarr project via Paypal: address@hidden
AWStats (Author) :
To make a donation for AWStats project via Paypal: address@hidden
AWBot (Author) :
CVSChangeLogBuilder (Author) :

Régis Houssin
5, rue Corneille
VoIP: +33 1 83 62 40 03
GSM: +33 6 33 02 07 97
Email: address@hidden

Speedealing Developer
SaaS offers:
Development platform:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]