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 aafe84c commit 30f057e
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion code/services/MisdirectionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,16 @@ public function determineFallback($URL) {

// This is required to support multiple sites.

$parentID = ClassInfo::exists('Multisites') ? Multisites::inst()->getCurrentSiteId() : 0;
if(ClassInfo::exists('Multisites')) {
$parent = Multisites::inst()->getCurrentSite();
$parentID = $parent->ID;
$applicableRule = $parent->Fallback;
$toURL = $parent->FallbackLink;
$responseCode = $parent->FallbackResponseCode;
}
else {
$parentID = 0;
}

// Determine the page specific fallback.

Expand Down

0 comments on commit 30f057e

Please sign in to comment.