mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
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:
parent
f80cdd64cc
commit
625ab4e235
@ -310,6 +310,11 @@ JS;
|
||||
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
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user