A recent irc discussion yielded that there are different interpretations about how GalleryEmbed::init / ::done should be used.
As even I didn't use it like bharat thought it should be used, I reviewed a few things in the code.
GalleryEmbed::init() should be called only once per request.
GalleryEmbed::done() can be called multiple times.
We advice the use of a static variable to keep track in your integration code if you've already called GalleryEmbed::init().
I'd say we could move this static variable into GalleryEmbed::init(). That way, the integration code authors wouldn't have to care about it.
And because GalleryEmbed::init() can also GalleryInitSecondPass(), we should have two static variables. The second is to keep track if InitSecondPass() has been called.
Opinions?
Posts: 1378
Excellent idea that way G2 can check and make sure it is not breaking the rules, just in case us authors are ;)
Posts: 32509
in cvs now.
Posts: 1378