Ignore:
Timestamp:
Sep 23, 2010 4:15:54 PM (14 years ago)
Author:
mylan
Message:

#231: Fixed conflict with declaration of implemented interface for different plone versions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.pfg.captcha/trunk/quintagroup/pfg/captcha/validator.py

    r2770 r2852  
    22from Products.validation import validation 
    33from Products.validation.interfaces.IValidator import IValidator 
    4 from zope.interface import implements 
    5  
    64from Products.CMFPlone.utils import safe_hasattr 
    75 
     6from config import PLONE_VERSION 
     7 
    88class CaptchaValidator: 
    9  
    10     implements(IValidator) 
    119 
    1210    name = 'CaptchaValidator' 
     
    2927            return 1 
    3028 
     29if PLONE_VERSION == 4: 
     30    from zope.interface import classImplements 
     31    classImplements(CaptchaValidator, IValidator) 
     32else: 
     33    CaptchaValidator.__implements__ = (IValidator,) 
     34 
    3135validation.register(CaptchaValidator('isCaptchaCorrect')) 
Note: See TracChangeset for help on using the changeset viewer.