mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-13 07:29:39 +00:00
Piwik: Honor the enabled_for_downloads setting
This commit is contained in:
parent
9c1a0c3f2e
commit
a5eda594b6
@ -95,6 +95,8 @@ class PiwikPlugin(IndicoPlugin):
|
||||
self.register_css_bundle('jqtree_css', 'js/lib/jqTree/jqtree.css')
|
||||
|
||||
def track_download(self, attachment, user, **kwargs):
|
||||
if not self.settings.get('enabled_for_downloads'):
|
||||
return
|
||||
if attachment.type == AttachmentType.link:
|
||||
resource_url = attachment.link_url
|
||||
resource_title = 'Link - {0.title}'.format(attachment)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user