btrxpolls.php 595 B

12345678910111213141516171819202122
  1. <?php
  2. /**
  3. * Bitrix24 polls updates handler
  4. */
  5. if (ubRouting::get('action') == 'btrxpolls') {
  6. if ($ubillingConfig->getAlterParam('BTRX24_ENABLED')) {
  7. $exportProcess = new StarDust(PollsExport::EXPORT_PID);
  8. if ($exportProcess->notRunning()) {
  9. $exportProcess->start();
  10. $pollsExport = new PollsExport();
  11. $pollsExport->runExport();
  12. $exportProcess->stop();
  13. die('OK:BTRXPOLLS');
  14. } else {
  15. die('SKIPPED:BTRXPOLLS_ALREADY_RUNNING');
  16. }
  17. } else {
  18. die('ERROR:BTRX24_DISABLED');
  19. }
  20. }