Project

General

Profile

Revision 106e1cf9

ID106e1cf93eee20c481be789f023f524f0437e475
Parent 9a124e57
Child 439f531a

Added by Katja Luther about 3 years ago

ref #7599: fix php problems and code cleaning

View differences:

modules/cdm_dataportal/includes/pages.inc
107 107
    // --- get map service HTTP query parameters
108 108

  
109 109
    if (count($specimensOrObservations) > 0) {
110
        if (count($specimensOrObservations) > 0) {
111
            $occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid,  $by_associatedtaxon_query);
112

  
113
            $map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT);
114
            if($map_visibility == 'always' ||
115
                variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' &&
116
                (isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0]))
117
            )
118
            {
119
                $occurrence_query = $occurrence_queryDto->occurrenceQuery;
120
                $legend_format_query = null;
121
                $distribution_query = NULL;
122
                $map_render_array = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array());
123
            }
110

  
111
        $occurrence_queryDto = cdm_ws_get(CDM_WS_GEOSERVICE_OCCURRENCEMAP, $taxon->uuid, $by_associatedtaxon_query);
112

  
113
        $map_visibility = variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT);
114
        if ($map_visibility == 'always' ||
115
            variable_get(SPECIMEN_MAP_VISIBILITY, SPECIMEN_MAP_VISIBILITY_DEFAULT) == 'automatic' &&
116
            (isset($occurrence_queryDto->fieldUnitPoints[0]) || isset($occurrence_queryDto->derivedUnitPoints[0]))) {
117
            $occurrence_query = $occurrence_queryDto->occurrenceQuery;
118
            $legend_format_query = null;
119
            $distribution_query = NULL;
120
            $render_array['map'] = compose_map('specimens', $occurrence_query, $distribution_query, $legend_format_query, array());
124 121
        }
125 122
    }
126 123

  
127 124
    // -------------------------------------------------------
128
    $render_array['map'] = $map_render_array;
125

  
126

  
129 127

  
130 128
    if(variable_get('cdm_dataportal_compressed_specimen_derivate_table')){
131 129

  
......
168 166
            '#attributes' => array('class' => 'specimens'),
169 167
            '#rows' => array(),
170 168
        );
171
        $specimen_array = create_specimen_array($specimensOrObservations);
169
        $specimen_array = compose_specimen_array($specimensOrObservations);
172 170

  
173 171
        foreach($specimen_array as $value){
174 172
            $renderArray = array(
......
322 320
            10 // weight
323 321
        );
324 322
    }
325
    $render_array['pager'] = markup_to_render_array(
326
        theme('cdm_pager', array(
327
            'pager' => $pager,
328
            'path' => $_REQUEST['q'],
329
            'parameters' => $_REQUEST,
330
        )),
331
        10 // weight
332
    );
323

  
333 324
    RenderHints::popFromRenderStack();
334 325
    return $render_array;
335 326
}

Also available in: Unified diff

Add picture from clipboard (Maximum size: 40 MB)