2016-11-22 18:02:37 +03:00
|
|
|
<?php
|
2017-01-23 02:08:20 +03:00
|
|
|
$eventHandlers = array(
|
|
|
|
'icml' => 'onCronGenerateICML',
|
|
|
|
'history' => 'onCronSyncHistory',
|
|
|
|
);
|
2017-03-13 13:58:33 +03:00
|
|
|
|
|
|
|
if (isset($_SERVER['argv']) && (isset($_SERVER['argv'][2]) || isset($eventHandlers[$_SERVER['argv'][2]]))) {
|
2017-01-23 02:08:20 +03:00
|
|
|
new umiEventListener('cron', 'RetailCRM', $eventHandlers[$_SERVER['argv'][2]]);
|
2016-11-22 18:02:37 +03:00
|
|
|
}
|
2017-01-23 02:08:20 +03:00
|
|
|
|
|
|
|
if (isset($_GET['action']) && isset($eventHandlers[$_GET['action']])) {
|
|
|
|
new umiEventListener('cron', 'RetailCRM', $eventHandlers[$_GET['action']]);
|
2016-11-22 18:02:37 +03:00
|
|
|
}
|
2017-01-23 02:08:20 +03:00
|
|
|
|
2016-11-22 18:02:37 +03:00
|
|
|
new umiEventListener('systemModifyPropertyValue', 'RetailCRM', 'onModifyProperty');
|
|
|
|
new umiEventListener('systemModifyObject', 'RetailCRM', 'onModifyObject');
|
|
|
|
new umiEventListener('order-status-changed', 'RetailCRM', 'onOrderStatusChanged');
|
2017-01-23 02:08:20 +03:00
|
|
|
?>
|