1
0

disable.sql 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. -- SETTINGS
  2. SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = 'bx_persons' 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_persons';
  9. DELETE FROM `sys_pages_blocks` WHERE `module` = 'bx_persons' OR `object` IN('bx_persons_create_profile', 'bx_persons_delete_profile', 'bx_persons_edit_profile', 'bx_persons_edit_profile_cover', 'bx_persons_view_profile', 'bx_persons_view_profile_closed', 'bx_persons_profile_info', 'bx_persons_profile_friends', 'bx_persons_friend_requests', 'bx_persons_profile_favorites', 'bx_persons_profile_subscriptions', 'bx_persons_profile_comments', 'bx_persons_home', 'bx_persons_search', 'bx_persons_manage');
  10. -- MENU
  11. DELETE FROM `sys_objects_menu` WHERE `module` = 'bx_persons';
  12. DELETE FROM `sys_menu_sets` WHERE `module` = 'bx_persons';
  13. DELETE FROM `sys_menu_items` WHERE `module` = 'bx_persons' OR `set_name` IN('bx_persons_view_submenu', 'bx_persons_submenu', 'bx_persons_view_actions', 'bx_persons_view_actions_more', 'bx_persons_view_actions_all', 'bx_persons_snippet_meta', 'bx_persons_menu_manage_tools');
  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_persons';
  16. DELETE FROM `sys_acl_actions` WHERE `Module` = 'bx_persons';
  17. -- COMMENTS
  18. DELETE FROM `sys_objects_cmts` WHERE `Name` = 'bx_persons';
  19. -- VIEWS
  20. DELETE FROM `sys_objects_view` WHERE `name` = 'bx_persons';
  21. -- VOTES
  22. DELETE FROM `sys_objects_vote` WHERE `Name` = 'bx_persons';
  23. -- SCORES
  24. DELETE FROM `sys_objects_score` WHERE `name` = 'bx_persons';
  25. -- FAFORITES
  26. DELETE FROM `sys_objects_favorite` WHERE `name` = 'bx_persons';
  27. -- FEATURED
  28. DELETE FROM `sys_objects_feature` WHERE `name` = 'bx_persons';
  29. -- REPORTS
  30. DELETE FROM `sys_objects_report` WHERE `name` = 'bx_persons';
  31. -- METATAGS
  32. DELETE FROM `sys_objects_metatags` WHERE `object` = 'bx_persons';
  33. -- SEARCH
  34. DELETE FROM `sys_objects_search` WHERE `ObjectName` IN ('bx_persons', 'bx_persons_cmts');
  35. -- STATS
  36. DELETE FROM `sys_statistics` WHERE `name` LIKE 'bx_persons%';
  37. -- CHARTS
  38. DELETE FROM `sys_objects_chart` WHERE `object` LIKE 'bx_persons%';
  39. -- GRIDS
  40. DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
  41. DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
  42. DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_persons_administration', 'bx_persons_common');
  43. -- LIVE UPDATES
  44. DELETE FROM `sys_objects_live_updates` WHERE `name` = 'bx_persons_friend_requests';
  45. -- ALERTS
  46. SET @iHandler := (SELECT `id` FROM `sys_alerts_handlers` WHERE `name` = 'bx_persons' LIMIT 1);
  47. DELETE FROM `sys_alerts` WHERE `handler_id` = @iHandler;
  48. DELETE FROM `sys_alerts_handlers` WHERE `id` = @iHandler;
  49. -- PRIVACY
  50. DELETE FROM `sys_objects_privacy` WHERE `object` IN('bx_persons_allow_view_to');
  51. -- EMAIL TEMPLATES
  52. DELETE FROM `sys_email_templates` WHERE `Module` = 'bx_persons';
  53. -- UPLOADERS
  54. DELETE FROM `sys_objects_uploader` WHERE `object` IN('bx_persons_cover_crop', 'bx_persons_picture_crop');