Changeset 1028

Show
Ignore:
Timestamp:
12/21/07 04:48:47
Author:
mylan
Message:

Fix bug with 'absolute_url' AttributeError?.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • qLocalSkin/trunk/browser/localPortalState.py

    r1003 r1028  
    1313        """ Return url to container, which provided 
    1414            IShiftPortalUrl marker interface, as portal_url. 
     15            Use functionality of portal_url's __call__ method 
     16            patch. 
    1517        """ 
    16         purl = self.portal().absolute_url() 
    17         ## BBB:  
    18         ## Until zope.location.LocationIterator 
    19         ## not yet function in Plone3 - use  
    20         ## aquisition for looking up parent objects. 
    21         ob = self.context.aq_self 
    22         oburl = ob.absolute_url() 
    23         while purl in oburl: 
    24             if IShiftPortalUrl.providedBy(ob): 
    25                 return oburl 
    26             ob = ob.aq_parent 
    27             oburl = ob.absolute_url() 
    28         return purl 
     18        return self.context.portal_url()