Cleanup haveEnoughPictures() (cherry picked from commit 5344422)
Cleanup haveEnoughPictures()
(cherry picked from commit 5344422)

desaintmartin/gallery,IATkachenko/gallery,desaintmartin/gallery,interfasys/galleryplus,owncloud/gallery,leftees/galleryplus,leftees/galleryplus,tahaalibra/gallery,imjalpreet/gallery,patman15/galleryplus,viraj96/gallery,patman15/galleryplus,owncloud/galleryplus,viraj96/gallery,efueger/galleryplus,setnes/galleryplus,setnes/gallery,imjalpreet/gallery,patman15/galleryplus,owncloud/gallery,IATkachenko/gallery,leftees/galleryplus,tahaalibra/gallery,owncloud/gallery,interfasys/galleryplus,viraj96/gallery,imjalpreet/gallery,interfasys/galleryplus,setnes/gallery,tahaalibra/gallery,desaintmartin/gallery,setnes/galleryplus,owncloud/galleryplus,IATkachenko/gallery,setnes/galleryplus,setnes/gallery,owncloud/galleryplus,efueger/galleryplus