Update BaseGallery.php