Commit a210d0c0 authored by Kirk Webb's avatar Kirk Webb

Fix up phantomnet domain detection at top level, production install.

parent 988c63ba
......@@ -110,7 +110,7 @@ elseif (0 || ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.cloudlab.us")) {
$APTBASE .= "/" . $matches[1];
}
}
elseif ($TBMAINSITE && $_SERVER["SERVER_NAME"] == "www.phantomnet.org") {
elseif ($ISALTDOMAIN && $_SERVER["SERVER_NAME"] == "www.phantomnet.org") {
$ISVSERVER = 1;
$TBAUTHDOMAIN = ".phantomnet.org";
$COOKDIEDOMAIN= "www.phantomnet.org";
......
......@@ -194,6 +194,7 @@ $RSS_HEADER_PNNEWS =
# virtual domain. We include a site-dependent definitions file.
#
$ALTERNATE_DOMAINS = array();
$ISALTDOMAIN = 0;
$DOMVIEW = NULL;
$altdomfile = strtolower("alternate_domains_${OURDOMAIN}.php");
if (file_exists($altdomfile)) {
......@@ -686,6 +687,7 @@ function SetDomainDefs()
foreach ($ALTERNATE_DOMAINS as $altdom) {
list($dpat, $ovr) = $altdom;
if (preg_match($dpat, $_SERVER['SERVER_NAME']) == 1) {
$ISALTDOMAIN = 1;
# Replacement defs derived from the virtual domain itself.
$WWWHOST = $_SERVER['SERVER_NAME'];
$OURDOMAIN = implode(".", array_slice(explode(".",$WWWHOST),1));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment