I have two issues with $_LIGHTBOX2_INCLUDE being a global variable:
1. Globals are bad, and duplicating the include check on the caller side is not optimal either.
2. Lightbox2's usage of globals doesn't work at my place, and the files are included multiple times. Possibly some globals restriction from my standard Ubuntu/Apache/PHP settings.

I propose the attached patch that makes the code a bit cleaner and additionally makes Lightbox2 work on my system. Other than this little issue, Lightbox2 is working great - thanks a lot for this neat module, it's the image display solution I always had searched for :D

CommentFileSizeAuthor
lightbox2-better-include-check.patch1.7 KBjpetso

Comments

stella’s picture

Assigned: Unassigned » stella
Status: Needs review » Fixed

Fixed in CVS and will be included in the next release. Thanks for the patch.

Cheers,
Stella

Anonymous’s picture

Status: Fixed » Closed (fixed)
stella’s picture

Released in Lightbox V2 5.x-2.2.

Cheers,
Stella