Import lithium roles into groups
This commit is contained in:
parent
5e97a9bfb7
commit
ade7c94b43
|
@ -53,6 +53,7 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||||
|
|
||||||
@max_start_id = Post.maximum(:id)
|
@max_start_id = Post.maximum(:id)
|
||||||
|
|
||||||
|
import_groups
|
||||||
import_categories
|
import_categories
|
||||||
import_users
|
import_users
|
||||||
import_topics
|
import_topics
|
||||||
|
@ -70,15 +71,15 @@ class ImportScripts::Lithium < ImportScripts::Base
|
||||||
puts "", "importing groups..."
|
puts "", "importing groups..."
|
||||||
|
|
||||||
groups = mysql_query <<-SQL
|
groups = mysql_query <<-SQL
|
||||||
SELECT usergroupid, title
|
SELECT DISTINCT name
|
||||||
FROM usergroup
|
FROM roles
|
||||||
ORDER BY usergroupid
|
ORDER BY name
|
||||||
SQL
|
SQL
|
||||||
|
|
||||||
create_groups(groups) do |group|
|
create_groups(groups) do |group|
|
||||||
{
|
{
|
||||||
id: group["usergroupid"],
|
id: group["name"],
|
||||||
name: @htmlentities.decode(group["title"]).strip
|
name: @htmlentities.decode(group["name"]).strip
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue