@@ -179,19 +187,7 @@ function entity_mesh_alter_node_delete_form(&$form, NodeInterface $node) {
...
@@ -179,19 +187,7 @@ function entity_mesh_alter_node_delete_form(&$form, NodeInterface $node) {
return;
return;
}
}
// If there are a big amount of references, we show a warning
// message without the node list.
if($count>20){
$form[$node_id]=[
'#type'=>'html_tag',
'#tag'=>'h4',
'#value'=>t('There are @count references to "@label". Please review this case carefully before proceeding with the deletion.',['@count'=>$count,'@label'=>$label]),
];
return;
}
$items=[];
$items=[];
$history=[];
$execution=$query->execute();
$execution=$query->execute();
$execution=$execution->fetchAll();
$execution=$execution->fetchAll();
...
@@ -199,25 +195,48 @@ function entity_mesh_alter_node_delete_form(&$form, NodeInterface $node) {
...
@@ -199,25 +195,48 @@ function entity_mesh_alter_node_delete_form(&$form, NodeInterface $node) {
'#value'=>t('The following contents refer to "@label". Please review them before proceeding with the deletion.',['@label'=>$label]),
'#value'=>t('Warning: "@label" is linked from other content listed below. Deleting it may result in broken references that should be updated',['@label'=>$label]),