remove $gallery, adapt to zenphoto 1.4.6 (deprecated function)