Provide context to trigger

This commit is contained in:
Laurent Destailleur 2018-02-23 10:39:39 +01:00
parent 420fe3a07a
commit d8f8e76bee

View File

@ -715,11 +715,12 @@ class Categorie extends CommonObject
}
}
// Save object we want to link category to into category instance to provide information to trigger
$this->linkto=$obj;
// Call trigger
$result=$this->call_trigger('CATEGORY_LINK',$user);
$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
$result=$this->call_trigger('CATEGORY_LINK',$user);
if ($result < 0) { $error++; }
// End call triggers