Skip to content
This repository has been archived by the owner on Jan 10, 2021. It is now read-only.

Commit

Permalink
FIX, a site object fallback will now actually be used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Glasl committed Mar 27, 2017
1 parent 30f057e commit d78a758
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions code/services/MisdirectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,12 @@ public function determineFallback($URL) {
if(ClassInfo::exists('Multisites')) {
$parent = Multisites::inst()->getCurrentSite();
$parentID = $parent->ID;
$applicableRule = $parent->Fallback;
$toURL = $parent->FallbackLink;
$responseCode = $parent->FallbackResponseCode;
if($parent->Fallback) {
$applicableRule = $parent->Fallback;
$nearestParent = $thisPage = Director::baseURL();
$toURL = $parent->FallbackLink;
$responseCode = $parent->FallbackResponseCode;
}
}
else {
$parentID = 0;
Expand Down

0 comments on commit d78a758

Please sign in to comment.