[Zope-CMF] Re: Redundant methods in URLTool

Yuppie schubbe@web.de
Mon, 28 Apr 2003 23:59:43 +0200


Florent Guillaume wrote:
>>Is there a reason we have both getRelativeUrl and getRelativeContentURL?
>>
>>AFAICT they return exactly the same thing.
> 
> 
> They do. I don't know why the two are here. We could simplify the code
> to have one call the other, but removing one may be problematic for
> backward-compat purposes.

Already done months ago:

     security.declarePublic('getRelativeContentURL')
     def getRelativeContentURL(self, content):
         """ Get the URL for an object, relative to the portal root.
         """
         return '/'.join( self.getRelativeContentPath(content) )

     security.declarePublic('getRelativeUrl')
     getRelativeUrl = getRelativeContentURL

Cheers,

Yuppie