Merge pull request #172 from dnadesign/redirect_fix_between_CMS_sections

redirect_fix_between_CMS_sections
This commit is contained in:
Damian Mooyman 2015-02-09 09:44:43 +13:00
commit ebebff248f

View File

@ -217,7 +217,11 @@ class LeftAndMainSubsites extends Extension {
// Update current subsite in session
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/');
}
@ -230,7 +234,11 @@ class LeftAndMainSubsites extends Extension {
// Update current subsite in session
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/');
}