Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module b/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module
- index a2a84c5..ac9eaab 100644
- --- a/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module
- +++ b/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module
- @@ -579,6 +579,13 @@ function _lefigaro_xml__nid_from_id_notation($type, $idnotation) {
- if (isset($result['node']) && is_array($result['node'])) {
- return (key($result['node']));
- }
- +
- + if (($node_type = lefigaro_common_node_type_from_id_notation($idnotation)) && ($node_type != $type)) {
- + watchdog('lefigaro_xml', 'Node creation of the wrong type: id_notation=@id_notation, correct type = @node_type, asked type = @type', array('@id_notation' => $idnotation, '@node_type' => $node_type, '@type' => $type), WATCHDOG_WARNING);
- + // Hopefully we can do it:
- + // return;
- + }
- +
- $node = new stdClass();
- $node->{'field_' . $type . '_id_notation'}[LANGUAGE_NONE][0]['value'] = $idnotation;
- if ($node = lefigaro_xml__node_import($node, $type)) {
- @@ -1389,4 +1396,4 @@ function _lefigaro_xml__purge_combourse_img() {
- foreach ($styles as $style) {
- file_unmanaged_delete_recursive(image_style_path($style, variable_get('lefigaro_common_combourse_dest_path', '')));
- }
- -}
- \ No newline at end of file
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement