Commit ce4e04f0 authored by catch's avatar catch

Issue #2797967 by tim.plunkett: Field UI needlessly resaves each enabled entity display

parent 0fb201ca
...@@ -876,8 +876,12 @@ protected function getDisplayStatuses() { ...@@ -876,8 +876,12 @@ protected function getDisplayStatuses() {
protected function saveDisplayStatuses($display_statuses) { protected function saveDisplayStatuses($display_statuses) {
$displays = $this->getDisplays(); $displays = $this->getDisplays();
foreach ($displays as $display) { foreach ($displays as $display) {
$display->set('status', $display_statuses[$display->get('mode')]); // Only update the display if the status is changing.
$display->save(); $new_status = $display_statuses[$display->get('mode')];
if ($new_status !== $display->status()) {
$display->set('status', $new_status);
$display->save();
}
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment