Modified Gallery.class.php

Signed-off-by: Roshan Bhagat <roshanbhgt@gmail.com>