disable.sql 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. -- SETTINGS
  2. SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_organizations' LIMIT 1);
  3. SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
  4. DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
  5. DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
  6. DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
  7. -- PAGES
  8. DELETE FROM `sys_objects_page` WHERE `module` = 'bx_organizations';
  9. DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_organizations' OR `object` IN('bx_organizations_create_profile', 'bx_organizations_delete_profile', 'bx_organizations_edit_profile', 'bx_organizations_edit_profile_cover', 'bx_organizations_view_profile', 'bx_organizations_view_profile_closed', 'bx_organizations_profile_info', 'bx_organizations_profile_friends', 'bx_organizations_home');
  10. -- MENU
  11. DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_organizations';
  12. DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_organizations';
  13. DELETE FROM `sys_menu_items` WHERE `module` = 'bx_organizations' OR `set_name` IN('bx_organizations_view_submenu', 'bx_organizations_submenu', 'bx_organizations_view_actions', 'bx_organizations_view_actions_more');
  14. -- ACL
  15. DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = 'bx_organizations';
  16. DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_organizations';
  17. -- VIEWS
  18. DELETE FROM `sys_objects_view` WHERE `Name` = 'bx_organizations';
  19. -- METATAGS
  20. DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_organizations';
  21. -- CATEGORY
  22. DELETE FROM `sys_objects_category` WHERE `object` = 'bx_organizations_cats';
  23. -- SEARCH
  24. DELETE FROM `sys_objects_search` WHERE `ObjectName` = 'bx_organizations';
  25. -- GRIDS
  26. DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
  27. DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
  28. DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_organizations_administration', 'bx_organizations_moderation', 'bx_organizations_common');
  29. -- ALERTS
  30. SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_organizations' LIMIT 1);
  31. DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
  32. DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
  33. -- PRIVACY
  34. DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_organizations_allow_view_to');
  35. -- UPLOADERS
  36. DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_organizations_cover_crop', 'bx_organizations_picture_crop');