BxNtfsCronClean.php 770 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup Notifications Notifications
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxNtfsCronClean extends BxDolCron
  12. {
  13. protected $_sModule;
  14. protected $_oModule;
  15. public function __construct()
  16. {
  17. $this->_sModule = 'bx_notifications';
  18. $this->_oModule = BxDolModule::getInstance($this->_sModule);
  19. parent::__construct();
  20. }
  21. function processing()
  22. {
  23. $iClearIntervalInDays = (int)getParam('bx_notifications_clear_interval');
  24. if($iClearIntervalInDays > 0){
  25. $this->_oModule->_oDb->cleanEvents($iClearIntervalInDays);
  26. }
  27. }
  28. }
  29. /** @} */