in case $_SERVER['HTTP_HOST']) is not set let's return localhost - better than nothing
use $_SERVER['SERVER_NAME'] in case $_SERVER['HTTP_HOST'] is not set
Merge pull request #3748 from owncloud/fixing-3740-master

in case $_SERVER['HTTP_HOST']) is not set let's return localhost - bette...