On 19 September 2011 14:56, yuppie <y.2...@wcm-solutions.de> wrote:

> Hi!
> Hanno Schlichting wrote:
> > On Mon, Sep 19, 2011 at 11:57 AM, yuppie<y.2011-E2EsyBC0hj3+aS/
> vkh9...@public.gmane.org>  wrote:
> >> Currently CMF trunk contains some hacks to work around the catalog brain
> >> issues. But I hope there is a better solution. Maybe the ICatalogBrain
> >> methods getURL, _unrestrictedGetObject and getObject should have a
> >> REQUEST argument that is used instead of self.REQUEST?
> >>
> >> Any kind of feedback and help is welcome.
> >
> > Mmh, why don't we just use zope.globalrequest in ZCatalog directly?
> > And create a new ZCatalog 2.14 release series with this. Then we don't
> > have to wait for Zope 4.0 to include it.
> Using an explicit argument is always cleaner than using
> zope.globalrequest. And getObject() already has a (currently unused)
> REQUEST argument. And we might be able to provide a migration path for
> the API change: If we don't use registerToolInterface, we don't have to
> change getObject/getURL calls in places where we still use getToolByName.
> But with zope.globalrequest we can avoid modifying the API. So if it is
> fine to smuggle a zope.globalrequest dependency in Zope 2.13, that might
> be the better solution. Or did you mean to use ZCatalog 2.14 only in CMF?
getURL() is an extremely common operation, and is often called in TALES

-100 on making it take a mandatory request parameter when there are other
solutions available.

Zope-CMF maillist  -  Zope-CMF@zope.org

See https://bugs.launchpad.net/zope-cmf/ for bug reports and feature requests

Reply via email to