installer.php 892 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. */
  6. class BxAdsUpdater extends BxDolStudioUpdater
  7. {
  8. function __construct($aConfig)
  9. {
  10. parent::__construct($aConfig);
  11. }
  12. protected function actionUpdateFiles($bInstall = true)
  13. {
  14. $iResult = parent::actionUpdateFiles($bInstall);
  15. if($iResult == BX_DOL_STUDIO_INSTALLER_SUCCESS) {
  16. $aModuleConfig = BxDolInstallerUtils::getModuleConfig(BX_DIRECTORY_PATH_MODULES . $this->_aConfig['module_dir'] . 'install/config.php');
  17. if(isset($aModuleConfig['note']))
  18. $this->oDb->query("UPDATE `sys_modules` SET `note`=:note WHERE `uri`=:uri", [
  19. 'note' => $aModuleConfig['note'],
  20. 'uri' => $this->_aConfig['module_uri']
  21. ]);
  22. }
  23. return $iResult;
  24. }
  25. }