Update gallery.php