From c7b1a42d19f088c04ba67f0b2af1930025c342c5 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sun, 4 Mar 2012 10:29:47 +0000 Subject: [PATCH] Adds Redmine::Plugin.public_directory to be used instead of Engines.public_directory. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9065 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/controllers/admin_controller.rb | 2 +- lib/redmine/plugin.rb | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin_controller.rb b/app/controllers/admin_controller.rb index 5aecd5f6d..dd3e91236 100644 --- a/app/controllers/admin_controller.rb +++ b/app/controllers/admin_controller.rb @@ -79,7 +79,7 @@ class AdminController < ApplicationController User.find(:first, :conditions => ["login=? and hashed_password=?", 'admin', User.hash_password('admin')]).nil?], [:text_file_repository_writable, File.writable?(Attachment.storage_path)], - [:text_plugin_assets_writable, File.writable?(Engines.public_directory)], + [:text_plugin_assets_writable, File.writable?(Redmine::Plugin.public_directory)], [:text_rmagick_available, Object.const_defined?(:Magick)] ] end diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 2c77cf097..5c13e3d1f 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -43,6 +43,9 @@ module Redmine #:nodoc: # # When rendered, the plugin settings value is available as the local variable +settings+ class Plugin + cattr_accessor :public_directory + self.public_directory = File.join(Rails.root, 'public', 'plugin_assets') + @registered_plugins = {} class << self attr_reader :registered_plugins -- 2.39.5