Update gallery.php

trimmed