Project

General

Profile

Feature #41731 ยป prevent-redmine-startup-if-themes-are-installed-in-public-themes.patch

Go MAEDA, 2024-11-12 10:17

View differences:

config/environment.rb
12 12
  exit 1
13 13
end
14 14

  
15
# Make sure there's no themes in public/themes before starting
16
public_themes_dir = Rails.public_path.join('themes')
17
if Dir.glob(File.join(public_themes_dir, "*")).any?
18
  $stderr.puts "Themes in public/themes (#{public_themes_dir}) are no longer allowed. " \
19
    "Please, put your Redmine themes in the `themes` directory at the root of your " \
20
    "Redmine directory (#{Rails.root.join('themes')})"
21
  exit 1
22
end
23

  
15 24
# Initialize the Rails application
16 25
Rails.application.initialize!
    (1-1/1)