Skip to content

Commit

Permalink
FIX: base script import to handle category color/text color
Browse files Browse the repository at this point in the history
  • Loading branch information
ZogStriP committed May 19, 2015
1 parent f0b35b2 commit dcc4267
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
4 changes: 3 additions & 1 deletion script/import_scripts/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,9 @@ def create_category(opts, import_id)
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
Expand Down
1 change: 0 additions & 1 deletion script/import_scripts/bbpress.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
BB_PRESS_DB = ENV['BBPRESS_DB'] || "bbpress"
DB_TABLE_PREFIX = "wp_"


class ImportScripts::Bbpress < ImportScripts::Base

def initialize
Expand Down
3 changes: 1 addition & 2 deletions script/import_scripts/bespoke_1.rb
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
1 change: 0 additions & 1 deletion script/import_scripts/mybb.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require "mysql2"

require File.expand_path(File.dirname(__FILE__) + "/base.rb")

# Call it like this:
Expand Down
1 change: 0 additions & 1 deletion script/import_scripts/smf2.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'mysql2'

require File.expand_path(File.dirname(__FILE__) + '/base.rb')

require 'htmlentities'
Expand Down

0 comments on commit dcc4267

Please sign in to comment.