X-Git-Url: https://scm.cri.ensmp.fr/git/Portfolio.git/blobdiff_plain/2da869b2b46179d64c05eaac4081226fdbbbc9ff:/event_handlers.py..e73353500c67453ef9663d67eaeee7dd46c358ee:/Products/Portfolio/static/git-logo.png diff --git a/event_handlers.py b/event_handlers.py deleted file mode 100755 index 7e75286..0000000 --- a/event_handlers.py +++ /dev/null @@ -1,25 +0,0 @@ -# -*- coding: utf-8 -*- -############################################################ -# Copyright © 2005-2010 Benoît PIN # -# Plinn - http://plinn.org # -# # -# This program is free software; you can redistribute it # -# and/or modify it under the terms of the Creative Commons # -# "Attribution-Noncommercial 2.0 Generic" # -# http://creativecommons.org/licenses/by-nc/2.0/ # -############################################################ -""" Event handlers module -""" - -import transaction -from Products.CMFCore.utils import getToolByName - -def processQueueAdd(ob, event) : - pimtool = getToolByName(ob, 'portal_image_manipulation') - path = '/'.join(ob.getPhysicalPath()) - - def hook(success) : - if success: - pimtool._queueAdd(path) - - transaction.get().addAfterCommitHook(hook)