Project

General

Profile

« Previous | Next » 

Revision b8d1f824

Added by Andreas Kohlbecker about 8 years ago

#5704 fixing an old bug which stems from the drupal 5 to drupal 7 migration

View differences:

modules/cdm_dataportal/cdm_api/cdm_node.php
24 24
  // See cdm_add_node_content.
25 25
  switch ($node->type) {
26 26
    case 'cdm_' . NODETYPE_TAXON:
27
    case 'cdm_' . NODETYPE_NAME:
28
    case 'cdm_' . NODETYPE_REFERENCE:
29
    case 'cdm_' . NODETYPE_MEDIA:
27 30
      if (!isset($node->cdm) && arg(0) == 'node') {
28 31
        // If a node page is loaded directly, e.g. node/%nid instead of
29 32
        // cdm_dataportal/taxon/%uuid, try to load the taxon page content
......
224 227
    $cdm_content = markup_to_render_array( $content, variable_get('cdm_content_weight', -1));
225 228
  }
226 229

  
227
  // Comment @WA: for some reason $node->content is lost or recreated in
228
  //   node_show($node) in D7, so we attach to $node->cdm here and re-attach to
229
  //   $node->content in hook_node_view.
230
  //
231
  // Followup by @AK:
232
  //   $node->content is removed in node_build_content() we need to
233
  //   implement the 'view' hook in order to set the  $node->content
234
  //   properly in the drupal way. => TODO
235
  //
230
  //  $node->content is cleared in node_build_content() therefore we need to
231
  //  implement the 'view' hook in order to set the  $node->content
232
  //  properly => cdm_dataportal_node_view()
236 233
  $node->cdm = $cdm_content;
237 234
}
238 235

  

Also available in: Unified diff