Do not create two versions when sorting image galleries or downloads
Correctly detect Android tablets in the `Environment` class (see #5869)
Disable the maintenance mode if a back end user is logged in (see #6353)