Ignore:
Timestamp:
Feb 10, 2010 12:21:38 PM (14 years ago)
Author:
mylan
Message:

Fix deprication warining in catalog index registration

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quintagroup.canonicalpath/trunk/quintagroup/canonicalpath/catalog.py

    r782 r1685  
     1from zope.interface import Interface 
    12from zope.component import queryAdapter 
    2 from Products.CMFPlone.CatalogTool import registerIndexableAttribute 
     3from plone.indexer.decorator import indexer 
    34 
    45from interfaces import ICanonicalPath 
    56 
    6  
    7 def canonical_path(obj, portal, **kwargs): 
     7@indexer(Interface) 
     8def canonical_path(obj, **kwargs): 
    89    """Return canonical_path property for the object. 
    910    """ 
     
    1213        return cpath.canonical_path() 
    1314    return None 
    14  
    15 registerIndexableAttribute('canonical_path', canonical_path) 
Note: See TracChangeset for help on using the changeset viewer.