Fixed bug #5905: Missing checks for SSL, mallshop and language-hosts

Refactoring mall functionality
(cherry picked from commit 8c8ff56)