mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 06:46:11 +08:00
f34a0141c7
During the move from Classic autoloader to Zeitwerk import_export module was moved to correct file name convention.
427d54b2b0 (diff-d896ec33b95afb7fae9f8bfe73d0580b)
Problem is that export/import is still using old path to require that module
Meta: https://meta.discourse.org/t/topic-and-category-export-import/38930/40
19 lines
559 B
Ruby
19 lines
559 B
Ruby
# frozen_string_literal: true
|
|
|
|
desc 'Export all the categories'
|
|
task 'export:categories', [:category_ids] => [:environment] do |_, args|
|
|
require "import_export"
|
|
ids = args[:category_ids].split(" ")
|
|
|
|
ImportExport.export_categories(ids)
|
|
puts "", "Done", ""
|
|
end
|
|
|
|
desc 'Export only the structure of all categories'
|
|
task 'export:category_structure', [:include_group_users, :file_name] => [:environment] do |_, args|
|
|
require "import_export"
|
|
|
|
ImportExport.export_category_structure(args[:include_group_users], args[:file_name])
|
|
puts "", "Done", ""
|
|
end
|