]> source.dussan.org Git - redmine.git/commitdiff
Adds Redmine::Plugin.public_directory to be used instead of Engines.public_directory.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Mar 2012 10:29:47 +0000 (10:29 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 4 Mar 2012 10:29:47 +0000 (10:29 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9065 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/controllers/admin_controller.rb
lib/redmine/plugin.rb

index 5aecd5f6d4108e0a9438906a96115c442daa1228..dd3e912368f1cec52eb022470456112699769198 100644 (file)
@@ -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
index 2c77cf097d3a34e769dfc0320c10e5f3eea18a02..5c13e3d1fdf36d6729649c70abcdb83276526752 100644 (file)
@@ -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