MINOR make the 'default site' checkbox on a subsite actually work. If no subsite was found matching the requested domain, before returning 0 (the 'main' site), it will check for a 'default' site. (from r87086)

This commit is contained in:
Tom Rix 2010-03-01 21:49:22 +00:00
parent f80cdd64cc
commit 625ab4e235

View File

@ -310,6 +310,11 @@ JS;
return $subsiteIDs[0]; return $subsiteIDs[0];
} }
// Check for a 'default' subsite
if ($default = DataObject::get_one('Subsite', 'DefaultSite = 1')) {
return $default->ID;
}
// Default subsite id = 0, the main site // Default subsite id = 0, the main site
return 0; return 0;
} }