Sylvain Wallez wrote:
>
> Carsten Ziegeler wrote:
>
> >Hi,
> >
> >attached is the original mail from Volker about a bug in the
> SitemapSource.
> >Can someone comment on this?
> >Is it safe to apply the patch?
> >
>
> I'm not very fond of re-adding the URI and prefix as attributes of the
> SitemapSource: I removed them as part of a cleanup/refactoring, and
> reintroducing them will forbid some yet-unfinished code factorisation
> between SitemapSource and Environment stuff.
>
> Now this is right that a call to setURI() was trashed within the cleanup
> process and it appears to be needed (I still don't understand all of the
> environment's behaviour...).
>
> So what I propose is that MutableEnvironmentFacade keeps track of the
> values it was given at the first call to setURI(prefix, uri) and puts
> them back on the wrapped environment when reset() is called.
>
> What do you think ?
To be honest, I can't judge if it works or not :) But I trust you, and
yes doing it in MutableEnvironmentFacade is a little bit cleaner.
>
> Ah, and I really think a big cleanup is required is this
> environment/sitemapsource stuff, as it has been augmented, patched and
> repatched over the years and it's really difficult to understand how it
> works and why so much code is needed. How many people really understand
> all this code ? I don't count myself in this category :-/
>
Now, before your refactoring I could count me in there, but now... ;)
But to be honest, you're absolutely right. The whole thing is a collection
of great hacks that seem to work (well, most times at least).
I have started to write an RT about this that I wanted to post as soon as
we start with 2.2.
I think changing this in a "clean way" will be a little bit incompatible,
so I guess we should do it for 2.2 then.
Carsten