Changeset 2852 in products
- Timestamp:
- Sep 23, 2010 4:15:54 PM (14 years ago)
- Location:
- quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/config.py
r2083 r2852 4 4 5 5 ADD_PERMISSION = cmfcore_permissions.AddPortalContent 6 7 try: 8 # Plone 4 and higher 9 import plone.app.upgrade 10 PLONE_VERSION = 4 11 except ImportError: 12 PLONE_VERSION = 3 13 -
quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/validator.py
r2770 r2852 2 2 from Products.validation import validation 3 3 from Products.validation.interfaces.IValidator import IValidator 4 from zope.interface import implements5 6 4 from Products.CMFPlone.utils import safe_hasattr 7 5 6 from config import PLONE_VERSION 7 8 8 class CaptchaValidator: 9 10 implements(IValidator)11 9 12 10 name = 'CaptchaValidator' … … 29 27 return 1 30 28 29 if PLONE_VERSION == 4: 30 from zope.interface import classImplements 31 classImplements(CaptchaValidator, IValidator) 32 else: 33 CaptchaValidator.__implements__ = (IValidator,) 34 31 35 validation.register(CaptchaValidator('isCaptchaCorrect'))
Note: See TracChangeset
for help on using the changeset viewer.