Advertisement
jcisio

Untitled

Feb 7th, 2012
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1. 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
  2. index a2a84c5..ac9eaab 100644
  3. --- a/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module
  4. +++ b/www/sites/all/modules/custom/lefigaro_xml_import/lefigaro_xml_import.module
  5. @@ -579,6 +579,13 @@ function _lefigaro_xml__nid_from_id_notation($type, $idnotation) {
  6. if (isset($result['node']) && is_array($result['node'])) {
  7. return (key($result['node']));
  8. }
  9. +
  10. + if (($node_type = lefigaro_common_node_type_from_id_notation($idnotation)) && ($node_type != $type)) {
  11. + 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);
  12. + // Hopefully we can do it:
  13. + // return;
  14. + }
  15. +
  16. $node = new stdClass();
  17. $node->{'field_' . $type . '_id_notation'}[LANGUAGE_NONE][0]['value'] = $idnotation;
  18. if ($node = lefigaro_xml__node_import($node, $type)) {
  19. @@ -1389,4 +1396,4 @@ function _lefigaro_xml__purge_combourse_img() {
  20. foreach ($styles as $style) {
  21. file_unmanaged_delete_recursive(image_style_path($style, variable_get('lefigaro_common_combourse_dest_path', '')));
  22. }
  23. -}
  24. \ No newline at end of file
  25. +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement