Remove deprecated way of working. Use context array instead.
This commit is contained in:
parent
0c449b2ff4
commit
4c9ccb163c
@ -706,7 +706,6 @@ class Categorie extends CommonObject
|
|||||||
|
|
||||||
|
|
||||||
// Call trigger
|
// Call trigger
|
||||||
$this->linkto=$obj; // Deprecated. Save object we want to link category to into category instance to provide information to trigger
|
|
||||||
$this->context=array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
|
$this->context=array('linkto'=>$obj); // Save object we want to link category to into category instance to provide information to trigger
|
||||||
$result=$this->call_trigger('CATEGORY_LINK',$user);
|
$result=$this->call_trigger('CATEGORY_LINK',$user);
|
||||||
if ($result < 0) { $error++; }
|
if ($result < 0) { $error++; }
|
||||||
|
|||||||
@ -56,10 +56,10 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
|
|||||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||||
|
|
||||||
// We add subscription if we change category (new category may means more mailing-list to subscribe)
|
// We add subscription if we change category (new category may means more mailing-list to subscribe)
|
||||||
if (is_object($object->linkto) && method_exists($object->linkto, 'add_to_abo') && $object->linkto->add_to_abo() < 0)
|
if (is_object($object->context['linkto']) && method_exists($object->context['linkto'], 'add_to_abo') && $object->context['linkto']->add_to_abo() < 0)
|
||||||
{
|
{
|
||||||
$this->error=$object->linkto->error;
|
$this->error=$object->context['linkto']->error;
|
||||||
$this->errors=$object->linkto->errors;
|
$this->errors=$object->context['linkto']->errors;
|
||||||
$return=-1;
|
$return=-1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user