mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
MINOR Add caching to the TreeDropdownField tree action
This commit is contained in:
parent
5b7a84141b
commit
77339b7e75
@ -453,6 +453,8 @@ class TreeDropdownField extends FormField
|
||||
/** @var DataObject|Hierarchy $obj */
|
||||
$obj = null;
|
||||
$sourceObject = $this->getSourceObject();
|
||||
|
||||
Hierarchy::prepopulate_numchildren_cache($sourceObject);
|
||||
if ($id && !$request->requestVar('forceFullTree')) {
|
||||
$obj = DataObject::get_by_id($sourceObject, $id);
|
||||
$isSubTree = true;
|
||||
|
Loading…
Reference in New Issue
Block a user