Remove strange check on hook printOriginObjectLine.
Now need reshook.
This commit is contained in:
parent
4c3c613568
commit
91ef2a44fd
10
ChangeLog
10
ChangeLog
@ -3,6 +3,16 @@ English Dolibarr ChangeLog
|
|||||||
--------------------------------------------------------------
|
--------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
***** ChangeLog for 15.0.0 compared to 14.0.0 *****
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
---------------
|
||||||
|
|
||||||
|
WARNING:
|
||||||
|
|
||||||
|
Following changes may create regressions for some external modules, but were necessary to make Dolibarr better:
|
||||||
|
* Update hook 'printOriginObjectLine', removed check on product type and special code. Need now reshook.
|
||||||
|
|
||||||
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
***** ChangeLog for 14.0.0 compared to 13.0.0 *****
|
||||||
|
|
||||||
For users:
|
For users:
|
||||||
|
|||||||
@ -4805,13 +4805,18 @@ abstract class CommonObject
|
|||||||
|
|
||||||
if (!empty($this->lines)) {
|
if (!empty($this->lines)) {
|
||||||
foreach ($this->lines as $line) {
|
foreach ($this->lines as $line) {
|
||||||
if (is_object($hookmanager) && (($line->product_type == 9 && !empty($line->special_code)) || !empty($line->fk_parent_line))) {
|
$reshook = 0;
|
||||||
|
//if (is_object($hookmanager) && (($line->product_type == 9 && !empty($line->special_code)) || !empty($line->fk_parent_line))) {
|
||||||
|
if (is_object($hookmanager)) { // Old code is commented on preceding line.
|
||||||
if (empty($line->fk_parent_line)) {
|
if (empty($line->fk_parent_line)) {
|
||||||
$parameters = array('line'=>$line, 'i'=>$i);
|
$parameters = array('line'=>$line, 'i'=>$i, 'restrictlist'=>$restrictlist, 'selectedLines'=> $selectedLines);
|
||||||
$action = '';
|
$reshook = $hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
$hookmanager->executeHooks('printOriginObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
} else {
|
||||||
|
$parameters = array('line'=>$line, 'i'=>$i, 'restrictlist'=>$restrictlist, 'selectedLines'=> $selectedLines, 'fk_parent_line'=>$line->fk_parent_line);
|
||||||
|
$reshook = $hookmanager->executeHooks('printOriginObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
}
|
}
|
||||||
} else {
|
}
|
||||||
|
if (empty($reshook)) {
|
||||||
$this->printOriginLine($line, '', $restrictlist, '/core/tpl', $selectedLines);
|
$this->printOriginLine($line, '', $restrictlist, '/core/tpl', $selectedLines);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user