From 13a57cd455ebfc5c6bf09297aaeafb557c152424 Mon Sep 17 00:00:00 2001 From: Ross Jones Date: Tue, 23 Oct 2012 17:42:04 +0100 Subject: [PATCH] Fixed issue where add_resource was used regardless of ckan version --- ckanext/googleanalytics/plugin.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/googleanalytics/plugin.py b/ckanext/googleanalytics/plugin.py index 910a8a1..11bb893 100644 --- a/ckanext/googleanalytics/plugin.py +++ b/ckanext/googleanalytics/plugin.py @@ -52,7 +52,8 @@ class GoogleAnalyticsPlugin(p.SingletonPlugin): self.track_events = converters.asbool( config.get('googleanalytics.track_events', False)) - p.toolkit.add_resource('fanstatic_library', 'ckanext-googleanalytics') + if not converters.asbool(config.get('ckan.legacy_templates', 'false')): + p.toolkit.add_resource('fanstatic_library', 'ckanext-googleanalytics') def update_config(self, config): '''Change the CKAN (Pylons) environment configuration.