Project

General

Profile

« Previous | Next » 

Revision 7ac8c744

Added by Andreas Kohlbecker over 5 years ago

ref #7565 marking all code to be removed with comments & ref #7496 fixing cdm_taxontree_block_configure()

View differences:

modules/cdm_dataportal/cdm_taxontree/cdm_taxontree.module
114 114
 * Implements hook_block_configure().
115 115
 */
116 116
function cdm_taxontree_block_configure($delta) {
117
  // TODO Rename block deltas (e.g. '1') to readable strings.
118
  if (TRUE) {
117

  
118
  $form = array();
119 119
    switch ($delta) {
120
      case '1':
120
      case 'cdm_tree':
121
        /* TODO The option to use the cdm_taxontree for drupal vocabulaties also has been removed, the below code should be
122
           removed, see #7565
121 123
        $vocs = taxonomy_get_vocabularies();
122 124
        $options = array();
123 125
        foreach ($vocs as $voc) {
......
129 131
          '#default_value' => variable_get('cdm_taxontree_block_1_vid', 0),
130 132
          '#options' => $options,
131 133
        );
132
        return $form;
134
        */
133 135
    }
134
  }
136
  return $form;
135 137
}
136 138

  
137 139
/**
......
189 191
 */
190 192
function cdm_taxontree_field_formatter($field, $item, $formatter, $node) {
191 193
  switch ($formatter) {
194
    // TODO remove case, see #7565
192 195
    case 'link':
193 196
      $term = taxonomy_term_load($item['tid']);
194 197
      $taxa = db_query('SELECT name FROM {taxonomy_vocabulary} WHERE vid = :vid', array(':vid' => $term->vid))->fetchField();
......
364 367
 * alternativeConceptRefs
365 368
 *
366 369
 * @param array $terms
370
 *
371
 * TODO remove method, see #7565
367 372
 */
368 373
function cdm_taxontree_terms2treenodes(&$terms) {
369 374
  foreach ($terms as &$term) {
......
608 613
    if (isset($tree[$uuid]->expanded) && $tree[$uuid]->expanded == 'expanded' && ($expand_excluded || $tree[$uuid]->filter != 'excluded')) {
609 614

  
610 615
      if (isset($tree[$uuid]->vid)) {
616
        //  TODO remove case, see #7565
611 617
        $children = cdm_taxontree_get_children($uuid, $tree[$uuid]->vid);
612 618
      }
613 619
      else {
......
1002 1008
  $ahah_url = FALSE;
1003 1009
  if (!$is_leaf && !$is_expanded && $filter_class != 'filter_excluded') {
1004 1010
    if (isset($node->tid)) {
1011
      //  TODO remove case, see #7565
1005 1012
      $ahah_url = url('cdm_taxontree/taxonomy/children/' . $node->tid . '/' . $node->vid . '/cdm_taxontree/' . ($nextLevelIncluded ? 1 : 0) . '/' . ($show_filter_switch ? 1 : 0) . '/' . $tree_node_callback);
1006 1013
    }
1007 1014
    elseif (module_exists('cdm_dataportal')) {

Also available in: Unified diff