Compare commits

..

2 Commits

Author SHA1 Message Date
Guy Sartorelli
411e5d3635
Merge 4f727869ac into 393940195d 2024-10-21 00:52:19 +00:00
Guy Sartorelli
4f727869ac
API Update code to reflect changes to LeftAndMain 2024-10-21 13:52:05 +13:00
2 changed files with 2 additions and 6 deletions

View File

@ -51,10 +51,6 @@ SilverStripe\CMS\Controllers\CMSMain:
- SilverStripe\Subsites\Extensions\HintsCacheKeyExtension
- SilverStripe\Subsites\Extensions\SubsiteMenuExtension
SilverStripe\CMS\Controllers\CMSPagesController:
extensions:
- SilverStripe\Subsites\Extensions\SubsiteMenuExtension
SilverStripe\Subsites\Admin\SubsiteAdmin:
extensions:
- SilverStripe\Subsites\Extensions\SubsiteMenuExtension

View File

@ -6,7 +6,7 @@ use SilverStripe\Admin\AdminRootController;
use SilverStripe\Admin\CMSMenu;
use SilverStripe\Admin\CMSProfileController;
use SilverStripe\Admin\LeftAndMain;
use SilverStripe\CMS\Controllers\CMSPagesController;
use SilverStripe\CMS\Controllers\CMSMain;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\CMS\Controllers\CMSPageEditController;
use SilverStripe\Control\Controller;
@ -299,7 +299,7 @@ class LeftAndMainSubsites extends Extension
// will show a list of the requested subsite's pages
$currentSubsiteId = $request->getVar('SubsiteID');
if ($page && (int) $page->SubsiteID !== (int) $currentSubsiteId) {
return $this->owner->redirect(CMSPagesController::singleton()->Link());
return $this->owner->redirect(CMSMain::singleton()->Link());
}
// Page does belong to the current subsite, so remove the query string parameter and refresh the page