1
0
mirror of synced 2024-11-25 14:56:09 +03:00

fixed fqn for EventActions

This commit is contained in:
Ruslan Efanov 2021-03-25 16:34:02 +03:00
parent 1d2a9dca82
commit b2b637f016
2 changed files with 4 additions and 4 deletions

View File

@ -934,7 +934,7 @@ class intaro_retailcrm extends CModule
RegisterModule($this->MODULE_ID); RegisterModule($this->MODULE_ID);
RegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder"); RegisterModuleDependences("sale", "OnOrderUpdate", $this->MODULE_ID, "RetailCrmEvent", "onUpdateOrder");
RegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate"); RegisterModuleDependences("main", "OnAfterUserUpdate", $this->MODULE_ID, "RetailCrmEvent", "OnAfterUserUpdate");
RegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $this->MODULE_ID, "RetailCrmEvent", "orderSave"); RegisterModuleDependences("sale", \Bitrix\Sale\EventActions::EVENT_ON_ORDER_SAVED, $this->MODULE_ID, "RetailCrmEvent", "orderSave");
RegisterModuleDependences("sale", "OnSaleOrderDeleted", $this->MODULE_ID, "RetailCrmEvent", "orderDelete"); RegisterModuleDependences("sale", "OnSaleOrderDeleted", $this->MODULE_ID, "RetailCrmEvent", "orderDelete");
RegisterModuleDependences("sale", "OnSalePaymentEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "paymentSave"); RegisterModuleDependences("sale", "OnSalePaymentEntitySaved", $this->MODULE_ID, "RetailCrmEvent", "paymentSave");
RegisterModuleDependences("sale", "OnSalePaymentEntityDeleted", $this->MODULE_ID, "RetailCrmEvent", "paymentDelete"); RegisterModuleDependences("sale", "OnSalePaymentEntityDeleted", $this->MODULE_ID, "RetailCrmEvent", "paymentDelete");
@ -1192,7 +1192,7 @@ class intaro_retailcrm extends CModule
if (CModule::IncludeModule('sale')) { if (CModule::IncludeModule('sale')) {
UnRegisterModuleDependences( UnRegisterModuleDependences(
"sale", "sale",
\Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, \Bitrix\Sale\EventActions::EVENT_ON_ORDER_SAVED,
$this->MODULE_ID, $this->MODULE_ID,
"RetailCrmEvent", "RetailCrmEvent",
"orderSave" "orderSave"

View File

@ -290,12 +290,12 @@ if (isset($_POST['Update']) && ($_POST['Update'] == 'Y')) {
$orderDischarge = (int) htmlspecialchars(trim($_POST['order-discharge'])); $orderDischarge = (int) htmlspecialchars(trim($_POST['order-discharge']));
if (($orderDischarge != $previousDischarge) && ($orderDischarge == 0)) { if (($orderDischarge != $previousDischarge) && ($orderDischarge == 0)) {
// remove depenedencies // remove depenedencies
UnRegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave"); UnRegisterModuleDependences("sale", \Bitrix\Sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave");
UnRegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder"); UnRegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder");
UnRegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete"); UnRegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete");
} elseif (($orderDischarge != $previousDischarge) && ($orderDischarge == 1)) { } elseif (($orderDischarge != $previousDischarge) && ($orderDischarge == 1)) {
// event dependencies // event dependencies
RegisterModuleDependences("sale", \Bitrix\sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave"); RegisterModuleDependences("sale", \Bitrix\Sale\EventActions::EVENT_ON_ORDER_SAVED, $mid, "RetailCrmEvent", "orderSave");
RegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder"); RegisterModuleDependences("sale", "OnOrderUpdate", $mid, "RetailCrmEvent", "onUpdateOrder");
RegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete"); RegisterModuleDependences("sale", "OnSaleOrderDeleted", $mid, "RetailCrmEvent", "orderDelete");
} }