mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
FIX: base script import to handle category color/text color
This commit is contained in:
parent
f0b35b2fe2
commit
dcc4267490
@ -370,7 +370,9 @@ class ImportScripts::Base
|
||||
user_id: opts[:user_id] || opts[:user].try(:id) || -1,
|
||||
position: opts[:position],
|
||||
description: opts[:description],
|
||||
parent_category_id: opts[:parent_category_id]
|
||||
parent_category_id: opts[:parent_category_id],
|
||||
color: opts[:color] || "AB9364",
|
||||
text_color: opts[:text_color] || "FFF",
|
||||
)
|
||||
|
||||
new_category.custom_fields["import_id"] = import_id if import_id
|
||||
|
@ -8,7 +8,6 @@ require File.expand_path(File.dirname(__FILE__) + "/base.rb")
|
||||
BB_PRESS_DB = ENV['BBPRESS_DB'] || "bbpress"
|
||||
DB_TABLE_PREFIX = "wp_"
|
||||
|
||||
|
||||
class ImportScripts::Bbpress < ImportScripts::Base
|
||||
|
||||
def initialize
|
||||
|
@ -1,6 +1,5 @@
|
||||
# bespoke importer for a customer, feel free to borrow ideas
|
||||
#
|
||||
#
|
||||
|
||||
require 'csv'
|
||||
require File.expand_path(File.dirname(__FILE__) + "/base.rb")
|
||||
|
||||
|
@ -1,5 +1,4 @@
|
||||
require "mysql2"
|
||||
|
||||
require File.expand_path(File.dirname(__FILE__) + "/base.rb")
|
||||
|
||||
# Call it like this:
|
||||
|
@ -1,5 +1,4 @@
|
||||
require 'mysql2'
|
||||
|
||||
require File.expand_path(File.dirname(__FILE__) + '/base.rb')
|
||||
|
||||
require 'htmlentities'
|
||||
|
Loading…
x
Reference in New Issue
Block a user