btrxupd.php 559 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Bitrix24 userbase updates
  4. */
  5. if (ubRouting::get('action') == 'btrxupd') {
  6. if ($ubillingConfig->getAlterParam('BTRX24_ENABLED')) {
  7. $updateProcess = new StarDust(BtrxCRM::PID_NAME);
  8. if ($updateProcess->notRunning()) {
  9. $updateProcess->start();
  10. $crm = new BtrxCRM();
  11. $crm->runExport();
  12. $updateProcess->stop();
  13. die('OK:BTRXUPD');
  14. } else {
  15. die('SKIPPED:BTRXUPD_ALREADY_RUNNING');
  16. }
  17. } else {
  18. die('ERROR:BTRX24_DISABLED');
  19. }
  20. }