1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-03-10 19:23:06 +00:00

First version of plugin name check

This commit is contained in:
Holger Just 2010-08-31 17:54:22 +02:00
parent ad100ccf35
commit 132ece863d

View File

@ -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