Commit 61b44f06ab21e9f5ff948df20cf94d0e51f60ac0

Authored by Rodrigo Souto
1 parent 855e23ff

[tolerance-time] Checking if plugin is enabled before adding the action filter

plugins/tolerance_time/lib/tolerance_time_plugin.rb
... ... @@ -26,6 +26,7 @@ class ToleranceTimePlugin < Noosfero::Plugin
26 26 end
27 27  
28 28 def cms_controller_filters
  29 + return if !context.environment.plugin_enabled?(ToleranceTimePlugin)
29 30 block = lambda do
30 31 content = Article.find(params[:id])
31 32 if ToleranceTimePlugin.expired?(content)
... ...