Project

General

Profile

« Previous | Next » 

Revision 294bea51

Added by Andreas Kohlbecker over 12 years ago

fixing #2521 (Remove empty descriptions)

View differences:

modules/cdm_dataportal/cdm_dataportal.module
1476 1476
  return $out;
1477 1477
}
1478 1478

  
1479
/**
1480
 * returns true if the given $featureNode or any of its subordinate nodes contains at least one
1481
 * DescriptionElement
1482
 * @param unknown_type $featureNode A heature node as produced by the function _mergeFeatureTreeDescriptions()
1483
 */
1484
function hasFeatureNodeDescriptionElements($featureNode) {
1485

  
1486
  if(is_array($featureNode->descriptionElements) && count($featureNode->descriptionElements) > 0) {
1487
    return true;
1488
  } else if(is_array($featureNode->children)) {
1489
    foreach ($featureNode->children as $child) {
1490
      if(hasFeatureNodeDescriptionElements($child)){
1491
        return true;
1492
      }
1493
  }
1494
  return false;
1495
}
1496

  
1497
}

Also available in: Unified diff