[pLog-svn] r4691 - plog/branches/lifetype-1.2/class/net/http/session
Jon Daley
plogworld at jon.limedaley.com
Mon Feb 5 16:55:37 EST 2007
On Mon, 5 Feb 2007, oscar at devel.lifetype.net wrote:
> - $scriptUrl = HttpVars::getBaseUrl();
> + // get the current base url and fetch it dynamically according to the values
> + // returned by Apache/PHP if not set yet in the config settings
> + $config =& Config::getConfig();
> + $scriptUrl = $config->getValue( "base_url" );
> + if( $scriptUrl == "" )
> + $scriptUrl = HttpVars::getBaseUrl();
I am not entirely sure what this is doing. The base_url is always
set, isn't it? Or if it isn't, what cases isn't it set? Will
HttpVars::getBaseUrl() return the complete subdomain if called for a
subdomain'ed URL?
> - $domain = $url->getHost();
> + $domain = str_replace( "www.", ".", $url->getHost());
You probably want
preg_replace("/^www\./", ".", $url->getHost());
so it only replace www. at the beginning of the string.
More information about the pLog-svn
mailing list