On Wed 8 Dec 2010 21:00, Devel Tools pondered: > > Good Morning! > > This are the git changes for DokuWiki committed > yesterday. Please test them and report bugs. > > --------------------------------------------------------------------- > > http://github.com/splitbrain/dokuwiki/commit/204d9c533d983cce1a75f12ef218a92b01961d46 > Author: Andreas Gohr <andi[at]splitbrain.org> > Date: Wed Dec 8 23:55:54 2010 +0100 > > surpress warning in mail setup when hostname can't be determined which did: >- $replace['@MAIL@'] = 'noreply@'.parse_url(DOKU_URL,PHP_URL_HOST); >+ $host = @parse_url(DOKU_URL,PHP_URL_HOST); >+ if(!$host) $host = 'example.com'; >+ $replace['@MAIL@'] = 'noreply@'.$host; Isn't this the a more general fix? diff --git a/inc/init.php b/inc/init.php index 36bbf68..2f5a198 100644 --- a/inc/init.php +++ b/inc/init.php @@ -423,8 +423,14 @@ function getBaseURL($abs=null){ if($conf['baseurl']) return rtrim($conf['baseurl'],'/').$dir; //split hostheader into host and port - $addr = explode(':',$_SERVER['HTTP_HOST']); + if (isset($_SERVER['SERVER_NAME'])) { + $addr = explode(':',$_SERVER['SERVER_NAME']); + } else { + $addr = explode(':',$_SERVER['HTTP_HOST']); + } $host = $addr[0]; + if(!$host) $host = 'example.com'; + $port = ''; if (isset($addr[1])) { $port = $addr[1]; -- DokuWiki mailing list - more info at http://www.dokuwiki.org/mailinglist