mirror of
https://github.com/silverstripe/silverstripe-subsites
synced 2024-10-22 11:05:55 +02:00
Merge pull request #172 from dnadesign/redirect_fix_between_CMS_sections
redirect_fix_between_CMS_sections
This commit is contained in:
commit
ebebff248f
@ -217,7 +217,11 @@ class LeftAndMainSubsites extends Extension {
|
|||||||
// Update current subsite in session
|
// Update current subsite in session
|
||||||
Subsite::changeSubsite($_GET['SubsiteID']);
|
Subsite::changeSubsite($_GET['SubsiteID']);
|
||||||
|
|
||||||
//Redirect to clear the current page
|
if ($this->owner->canView(Member::currentUser())) {
|
||||||
|
//Redirect to clear the current page
|
||||||
|
return $this->owner->redirect($this->owner->Link());
|
||||||
|
}
|
||||||
|
//Redirect to the default CMS section
|
||||||
return $this->owner->redirect('admin/');
|
return $this->owner->redirect('admin/');
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -230,7 +234,11 @@ class LeftAndMainSubsites extends Extension {
|
|||||||
// Update current subsite in session
|
// Update current subsite in session
|
||||||
Subsite::changeSubsite($record->SubsiteID);
|
Subsite::changeSubsite($record->SubsiteID);
|
||||||
|
|
||||||
//Redirect to clear the current page
|
if ($this->owner->canView(Member::currentUser())) {
|
||||||
|
//Redirect to clear the current page
|
||||||
|
return $this->owner->redirect($this->owner->Link());
|
||||||
|
}
|
||||||
|
//Redirect to the default CMS section
|
||||||
return $this->owner->redirect('admin/');
|
return $this->owner->redirect('admin/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user