enable.sql 1.4 KB

123456789101112131415161718192021222324252627282930
  1. -- settings
  2. SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
  3. INSERT INTO `sys_options_types` (`group`, `name`, `caption`, `icon`, `order`) VALUES
  4. ('modules', 'bx_datafox', '_bx_datafox_adm_stg_cpt_type', 'bx_datafox@modules/boonex/datafox/|std-icon.svg', IF(NOT ISNULL(@iTypeOrder), @iTypeOrder + 1, 1));
  5. SET @iTypeId = LAST_INSERT_ID();
  6. INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order` )
  7. VALUES (@iTypeId, 'bx_datafox_general', '_bx_datafox_adm_stg_cpt_category_general', 1);
  8. SET @iCategId = LAST_INSERT_ID();
  9. INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `order`, `extra`) VALUES
  10. ('bx_datafox_id', '', @iCategId, 'DataFox Client ID', 'digit', '', '', 10, ''),
  11. ('bx_datafox_secret', '', @iCategId, 'DataFox Client Secret', 'secret', '', '', 12, '');
  12. -- alerts
  13. INSERT INTO `sys_alerts_handlers` (`name`, `class`, `file`, `service_call`) VALUES
  14. ('bx_datafox', 'BxDataFoxAlertsResponse', 'modules/boonex/datafox/classes/BxDataFoxAlertsResponse.php', '');
  15. SET @iHandler := LAST_INSERT_ID();
  16. INSERT INTO `sys_alerts` (`unit`, `action`, `handler_id`) VALUES
  17. ('system', 'clear_xss', @iHandler);
  18. -- injections
  19. INSERT INTO `sys_injections` (`name`, `page_index`, `key`, `type`, `data`, `replace`, `active`) VALUES
  20. ('bx_datafox', 0, 'injection_head', 'service', 'a:2:{s:6:"module";s:10:"bx_datafox";s:6:"method";s:14:"include_css_js";}', 0, 1);