Commit 61b44f06ab21e9f5ff948df20cf94d0e51f60ac0
1 parent
855e23ff
Exists in
master
and in
29 other branches
[tolerance-time] Checking if plugin is enabled before adding the action filter
Showing
1 changed file
with
1 additions
and
0 deletions
Show diff stats
plugins/tolerance_time/lib/tolerance_time_plugin.rb
@@ -26,6 +26,7 @@ class ToleranceTimePlugin < Noosfero::Plugin | @@ -26,6 +26,7 @@ class ToleranceTimePlugin < Noosfero::Plugin | ||
26 | end | 26 | end |
27 | 27 | ||
28 | def cms_controller_filters | 28 | def cms_controller_filters |
29 | + return if !context.environment.plugin_enabled?(ToleranceTimePlugin) | ||
29 | block = lambda do | 30 | block = lambda do |
30 | content = Article.find(params[:id]) | 31 | content = Article.find(params[:id]) |
31 | if ToleranceTimePlugin.expired?(content) | 32 | if ToleranceTimePlugin.expired?(content) |