mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
Merge pull request #30 from hafriedlander/fix/subsitesvariant
FIX subsites not activating after recent subsite session changes
This commit is contained in:
commit
7dd8d888cf
@ -31,14 +31,10 @@ class SearchVariantSubsites extends SearchVariant {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function activateState($state) {
|
function activateState($state) {
|
||||||
if (Controller::has_curr()) {
|
// We always just set the $_GET variable rather than store in Session - this always works, has highest priority
|
||||||
Subsite::changeSubsite($state);
|
// in Subsite::currentSubsiteID() and doesn't persist unlike Subsite::changeSubsite
|
||||||
}
|
$_GET['SubsiteID'] = $state;
|
||||||
else {
|
Permission::flush_permission_cache();
|
||||||
// TODO: This is a nasty hack - calling Subsite::changeSubsite after request ends
|
|
||||||
// throws error because no current controller to access session on
|
|
||||||
$_GET['SubsiteID'] = $state;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function alterDefinition($base, $index) {
|
function alterDefinition($base, $index) {
|
||||||
|
Loading…
Reference in New Issue
Block a user