BxFilesAlertsResponse.php 890 B

123456789101112131415161718192021222324252627282930313233
  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 Files Files
  7. * @ingroup UnaModules
  8. *
  9. * @{
  10. */
  11. class BxFilesAlertsResponse extends BxBaseModTextAlertsResponse
  12. {
  13. public function __construct()
  14. {
  15. $this->MODULE = 'bx_files';
  16. parent::__construct();
  17. }
  18. public function response($oAlert)
  19. {
  20. $CNF = $this->_oModule->_oConfig->CNF;
  21. if('system' == $oAlert->sUnit && 'save_setting' == $oAlert->sAction && isset($CNF['PARAM_ALLOWED_EXT']) && $CNF['PARAM_ALLOWED_EXT'] == $oAlert->aExtras['option']) {
  22. $this->_oModule->_oDb->setStorageAllowedExtensions($oAlert->aExtras['value']);
  23. BxDolCacheUtilities::getInstance()->clear('db');
  24. }
  25. return parent::response($oAlert);
  26. }
  27. }
  28. /** @} */