make gallery work after the removal of the shared folder

This patch is needed after https://github.com/owncloud/core/pull/8026 was merged to display shared pictures correctly.

cc @DeepDiver1975 @jancborchardt @icewind1991