ENHANCEMENT: Remove unused $controller from lambda function

This commit is contained in:
mattclegg 2020-04-04 14:29:00 +05:45
parent 9cb96bfc52
commit 2bbc280ce6
No known key found for this signature in database
GPG Key ID: 38F89AD4DDF94EC3

View File

@ -1674,9 +1674,8 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
'getTreeTitle' => 'HTMLFragment'
));
$controller = $this;
$columns->setFieldFormatting(array(
'listChildrenLink' => function ($value, &$item) use ($controller) {
'listChildrenLink' => function ($value, &$item) {
/** @var SiteTree $item */
$num = $item ? $item->numChildren() : null;
if ($num) {
@ -1687,7 +1686,7 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
);
}
},
'getTreeTitle' => function ($value, &$item) use ($controller) {
'getTreeTitle' => function ($value, &$item) {
$title = sprintf(
'<a class="action-detail" href="%s">%s</a>',
Controller::join_links(