Compare commits

..

2 Commits

Author SHA1 Message Date
Guy Sartorelli
5d747fa33c
Merge 00caf8d4ad into 393940195d 2024-10-17 00:14:11 +00:00
Guy Sartorelli
00caf8d4ad
API Update code to reflect changes to LeftAndMain 2024-10-17 13:13:17 +13:00
2 changed files with 6 additions and 2 deletions

View File

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

View File

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