mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix for v4: Admin returns "Too many pages" for subpages below top level (#6464)
* Fix for v4: Admin returns "Too many pages" for subpages below top level Simple logic error during porting to new version it appears * V4: LeftAndMain::getSiteTreeFor() returning space & New line in link The "Too many pages" "View as list" link had a return & tab characters in it * V4: LeftAndMain::getSiteTreeFor() fixes link for list view "Too many pages" link pointed to `?view=list` which is just normal hierarchy. Value had been updated to "listview" in #8c87ea6b
This commit is contained in:
parent
c2bc0df92a
commit
87fbd5f781
@ -1188,7 +1188,7 @@ class LeftAndMain extends Controller implements PermissionProvider
|
||||
$nodeCountCallback = function ($parent, $numChildren) use (&$controller, $className, $nodeThresholdLeaf) {
|
||||
if ($className !== 'SilverStripe\\CMS\\Model\\SiteTree'
|
||||
|| !$parent->ID
|
||||
|| $numChildren >= $nodeThresholdLeaf
|
||||
|| $numChildren <= $nodeThresholdLeaf
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
@ -1199,8 +1199,7 @@ class LeftAndMain extends Controller implements PermissionProvider
|
||||
_t('LeftAndMain.TooManyPages', 'Too many pages'),
|
||||
Controller::join_links(
|
||||
$controller->LinkWithSearch($controller->Link()),
|
||||
'
|
||||
?view=list&ParentID=' . $parent->ID
|
||||
'?view=listview&ParentID=' . $parent->ID
|
||||
),
|
||||
_t(
|
||||
'LeftAndMain.ShowAsList',
|
||||
|
Loading…
Reference in New Issue
Block a user