security update for uuid xmlsitemap file_field_path

This commit is contained in:
2018-10-13 16:01:24 +02:00
parent f7ae17e6c4
commit a163542966
109 changed files with 5458 additions and 1952 deletions

View File

@@ -84,7 +84,15 @@ function uuid_entities_features_export_render($module_name, $components, $export
}
// We unset some common timestamp properties, since those will change and
// constantly leave the feature overidden.
$keys = array('created', 'updated', 'changed', 'revision_timestamp', 'timestamp', 'stamp', 'current');
$keys = array(
'created',
'updated',
'changed',
'revision_timestamp',
'timestamp',
'stamp',
'current',
);
foreach ($keys as $key) {
if (isset($entity->{$key})) {
unset($entity->{$key});
@@ -93,7 +101,7 @@ function uuid_entities_features_export_render($module_name, $components, $export
// Let other modules alter exported entities.
drupal_alter('uuid_entities_features_export_entity', $entity, $entity_type);
// Field handling.
list(,, $bundle_name) = entity_extract_ids($entity_type, $entity);
list(, , $bundle_name) = entity_extract_ids($entity_type, $entity);
$instances = field_info_instances($entity_type, $bundle_name);
foreach ($instances as $field_name => $instance) {
$field = field_info_field($field_name);
@@ -121,7 +129,10 @@ function uuid_entities_features_export_render($module_name, $components, $export
}
uuid_entities_features_clean($entity);
// Convert entities to array to avoid having them in JSON, returned from standard implementation of $entity->export().
/*
* Convert entities to array to avoid having them in JSON, returned
* from standard implementation of $entity->export().
*/
if (is_object($entity) && method_exists($entity, 'export')) {
$entity = get_object_vars($entity);
}
@@ -134,14 +145,14 @@ function uuid_entities_features_export_render($module_name, $components, $export
}
/**
* Implements [component]_features_export_rebuild().
* Implements [component]_features_rebuild().
*/
function uuid_entities_features_rebuild($module_name) {
uuid_entities_rebuild($module_name, 'rebuild');
}
/**
* Implements [component]_features_export_revert().
* Implements [component]_features_revert().
*/
function uuid_entities_features_revert($module_name) {
uuid_entities_rebuild($module_name, 'revert');
@@ -157,6 +168,7 @@ function uuid_entities_rebuild($module_name = '', $op = 'rebuild') {
foreach ($entities as $plan_name => $entities) {
// Let other modules do things before default entities are created.
module_invoke_all("uuid_entities_pre_$op", $plan_name);
drupal_alter("uuid_entities_pre_$op", $entities, $plan_name);
foreach ($entities as $entity) {
entity_uuid_save($entity->__metadata['type'], $entity);
}