Skip to content
Snippets Groups Projects
Commit 77fd2c1d authored by Randy Kolenko's avatar Randy Kolenko
Browse files

Issue #3389407: Deprecated function: addcslashes()

parent aece08d4
No related branches found
No related tags found
No related merge requests found
...@@ -227,21 +227,24 @@ function maestro_form_alter(&$form, FormStateInterface $form_state, $form_id) { ...@@ -227,21 +227,24 @@ function maestro_form_alter(&$form, FormStateInterface $form_state, $form_id) {
if (array_key_exists('base_form_id', $build_info) && $build_info['base_form_id'] == 'node_form') { if (array_key_exists('base_form_id', $build_info) && $build_info['base_form_id'] == 'node_form') {
$form_obj = $form_state->getFormObject(); $form_obj = $form_state->getFormObject();
$node = $form_obj->getEntity(); $node = $form_obj->getEntity();
$bundle = 'node'; $node_id = $node->id() ?? NULL;
$type = $node->getType(); if($node_id) {
$query = \Drupal::entityTypeManager()->getStorage('maestro_entity_identifiers')->getQuery(); $bundle = 'node';
$query ->condition('entity_type', $bundle) $type = $node->getType();
->accessCheck(FALSE) $query = \Drupal::entityTypeManager()->getStorage('maestro_entity_identifiers')->getQuery();
->condition('bundle', $type) $query ->condition('entity_type', $bundle)
->condition('entity_id', $node->id()); ->accessCheck(FALSE)
$entity_ids = $query->execute(); ->condition('bundle', $type)
if (count($entity_ids)) { ->condition('entity_id', $node->id());
$record = \Drupal::entityTypeManager()->getStorage('maestro_entity_identifiers')->load(current($entity_ids)); $entity_ids = $query->execute();
if ($record) { if (count($entity_ids)) {
$processID = $record->process_id->getString(); $record = \Drupal::entityTypeManager()->getStorage('maestro_entity_identifiers')->load(current($entity_ids));
$processRecord = MaestroEngine::getProcessEntryById($processID); if ($record) {
if ($processRecord->complete->getString() == '0') { $processID = $record->process_id->getString();
$nodeIsInUse = TRUE; $processRecord = MaestroEngine::getProcessEntryById($processID);
if ($processRecord->complete->getString() == '0') {
$nodeIsInUse = TRUE;
}
} }
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment