Project

General

Profile

« Previous | Next » 

Revision f56b1626

Added by Andreas Kohlbecker over 10 years ago

solving #3377 (search results on only one classification should never show the classifiation information)

View differences:

7.x/modules/cdm_dataportal/cdm_dataportal.search.php
181 181

  
182 182

  
183 183
   if ($classificationSelect === TRUE) {
184
      $form['search']['tree'] = array(
184
      $form['search']['tree'] = array(
185
        '#title' => t('Classification'),
185 186
        '#weight' => 1,
186 187
        '#type' => 'select',
187 188
        '#default_value' => get_taxonomictree_uuid_selected(),
188
        '#options' => cdm_get_taxontrees_as_options(TRUE),
189
        '#options' => cdm_get_taxontrees_as_options(TRUE),
190
        '#description' => t('A filter to limit the search to a specific classification.')
189 191
      );
190 192
   }
191 193

  
......
463 465
  }
464 466
  // if the 'NONE' classification has been chosen (adanced search) delete the tree information
465 467
  // to avoid unknown uuid exceptions in the cdm service
466
  if (isset($form_params['tree']) && $form_params['tree'] == 'NONE') {
468
  if (isset($form_params['tree']) && ($form_params['tree'] == 'NONE' || ! is_uuid($form_params['tree']))) {
467 469
//     $form_params['ignore_classification'] =  TRUE;
468 470
    unset($form_params['tree']);
469 471
  }
......
484 486
 * otherwise it will return the infomation from the last search executed. The information is retrieved from
485 487
 * the $_SESSION variable:  $_SESSION['cdm']['search']['tree']
486 488
 *
487
 * @return bool
488
 *    the classification the last processed search has been run on or NULL, it it was on all classifications
489
 * @return
490
 *    the CDM classification instance which has been used a filter for the last processed search
491
 *    or NULL, it it was on all classifications
489 492
 */
490 493
function cdm_dataportal_searched_in_classification() {
491 494

  

Also available in: Unified diff