Issue #2761059 by govind.maloo, arunkumark, tstoeckler: Term::postDelete() needlessly uses entity_delete_multiple()
parent
08e11c168c
commit
367c98f45c
|
@ -68,7 +68,7 @@ class Term extends ContentEntityBase implements TermInterface {
|
||||||
// If the term has multiple parents, we don't delete it.
|
// If the term has multiple parents, we don't delete it.
|
||||||
$parents = $storage->loadParents($child->id());
|
$parents = $storage->loadParents($child->id());
|
||||||
if (empty($parents)) {
|
if (empty($parents)) {
|
||||||
$orphans[] = $child->id();
|
$orphans[] = $child;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -79,7 +79,7 @@ class Term extends ContentEntityBase implements TermInterface {
|
||||||
$storage->deleteTermHierarchy(array_keys($entities));
|
$storage->deleteTermHierarchy(array_keys($entities));
|
||||||
|
|
||||||
if (!empty($orphans)) {
|
if (!empty($orphans)) {
|
||||||
entity_delete_multiple('taxonomy_term', $orphans);
|
$storage->delete($orphans);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue