mirror of
https://github.com/discourse/discourse.git
synced 2025-06-03 15:24:33 +08:00
Revert "FIX: not permitted theme params when importing theme"
This reverts commit 813df1a3fb1a10703517e08a9e8221c336063b5d.
This commit is contained in:
@ -26,13 +26,13 @@ class Admin::ThemesController < Admin::AdminController
|
||||
|
||||
def import
|
||||
@theme = nil
|
||||
uploaded_theme = params.require(:theme)
|
||||
if uploaded_theme
|
||||
json = JSON::parse(uploaded_theme.read)
|
||||
if params[:theme]
|
||||
json = JSON::parse(params[:theme].read)
|
||||
theme = json['theme']
|
||||
|
||||
@theme = Theme.new(name: theme["name"], user_id: current_user.id)
|
||||
theme["theme_fields"]&.each do |field|
|
||||
|
||||
if field["raw_upload"]
|
||||
begin
|
||||
tmp = Tempfile.new
|
||||
|
Reference in New Issue
Block a user