From 132ece863dbe06d2f1adf8fd51c47860f8ec3aac Mon Sep 17 00:00:00 2001 From: Holger Just Date: Tue, 31 Aug 2010 17:54:22 +0200 Subject: [PATCH] First version of plugin name check --- lib/redmine/plugin.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/redmine/plugin.rb b/lib/redmine/plugin.rb index 11255e02d..0391b78c5 100644 --- a/lib/redmine/plugin.rb +++ b/lib/redmine/plugin.rb @@ -63,6 +63,9 @@ module Redmine #:nodoc: # Plugin constructor def self.register(id, &block) + # check if the plugin is in the correct location + puts "WARNING: Wrong plugin path" unless Engines.plugins.collect(&:name).include? id + p = new(id) p.instance_eval(&block) # Set a default name if it was not provided during registration