Skip to content
Snippets Groups Projects

CO2: update functions order change

1 file
+ 12
12
Compare changes
  • Side-by-side
  • Inline
@@ -112,15 +112,15 @@ function carbon_impact_evaluator_entity_delete(EntityInterface $entity) {
// Get Entity type
$entityType = $entity->getEntityTypeId();
if (($entityType == 'node') || ($entityType == 'taxonomy_term') || ($entityType == 'user') ) {
$entityType = $entity->getEntityTypeId();
$id = $entity->id();
$today_date = date('Y-m-d H:i:s');
$bd_table = \Drupal::database();
$table_row_delete = \Drupal::database()->delete('co2_info')
->condition('field_identifier', $entityType)
->condition('node_id', $id)
->execute();
}
$entityType = $entity->getEntityTypeId();
$id = $entity->id();
$today_date = date('Y-m-d H:i:s');
$bd_table = \Drupal::database();
$table_row_delete = \Drupal::database()->delete('co2_info')
->condition('field_identifier', $entityType)
->condition('node_id', $id)
->execute();
}
}
/**
@@ -402,7 +402,7 @@ function carbon_impact_evaluator_update_8002() {
}
}
function carbon_impact_evaluator_update_80017() {
function carbon_impact_evaluator_update_8003() {
// Defines the new field
$table = 'co2_info';
$entity_field = 'uuid';
@@ -439,7 +439,7 @@ function carbon_impact_evaluator_update_80017() {
}
}
function carbon_impact_evaluator_update_80016() {
function carbon_impact_evaluator_update_8004() {
// Define o novo campo
$table = 'co2_info';
$entity_field = 'uuid';
@@ -481,7 +481,7 @@ function carbon_impact_evaluator_update_80016() {
}
function carbon_impact_evaluator_update_80015() {
function carbon_impact_evaluator_update_8005() {
// Defines the new field
$table = 'co2_info';
$entity_field = 'uuid';
Loading