diff options
author | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-05 11:29:51 +0300 |
---|---|---|
committer | mattpiwik <matthieu.aubry@gmail.com> | 2011-01-05 11:29:51 +0300 |
commit | 390e6e4f0fb52236ba9e4101b8a9c31d59bdbea4 (patch) | |
tree | 930570a3ceea57c6c84d59645ac5773bd0b2b426 /core | |
parent | bc611406b24be9de47e3773ae65ed2d1521b0166 (diff) |
PDF reports from address didn't have the domain set properly because of buggy test condition
git-svn-id: http://dev.piwik.org/svn/trunk@3632 59fd770c-687e-43c8-a1e3-f5a4ff64c105
Diffstat (limited to 'core')
-rw-r--r-- | core/Mail.php | 6 | ||||
-rw-r--r-- | core/Url.php | 3 |
2 files changed, 3 insertions, 6 deletions
diff --git a/core/Mail.php b/core/Mail.php index 691c2ccc82..3b74504b14 100644 --- a/core/Mail.php +++ b/core/Mail.php @@ -31,11 +31,7 @@ class Piwik_Mail extends Zend_Mail public function setFrom($email, $name = null) { - $piwikHost = Piwik_Url::getCurrentHost(); - if(strlen($piwikHost) == 0) - { - $piwikHost = 'piwik.org'; - } + $piwikHost = Piwik_Url::getCurrentHost('piwik.org'); $email = str_replace('{DOMAIN}', $piwikHost, $email); parent::setFrom($email, $name); } diff --git a/core/Url.php b/core/Url.php index 7040814e70..b782bf95fe 100644 --- a/core/Url.php +++ b/core/Url.php @@ -171,7 +171,8 @@ class Piwik_Url } $default = Piwik_Common::sanitizeInputValue($default); - if(isset($_SERVER['HTTP_HOST'])) + if(isset($_SERVER['HTTP_HOST']) + && !empty($_SERVER['HTTP_HOST'])) { $default = Piwik_Common::sanitizeInputValue($_SERVER['HTTP_HOST']); } |