/** * Return the data for a single customer */ public function getData($id = null) { $lang = R3Locale::getLanguageID(); if ($id === null) { $id = $this->id; } $db = ezcDbInstance::get(); $vlu = array(); if ($this->new_udm_divider != '') { $lastDivider = $this->auth->setConfigValue('SETTINGS', 'GLOBAL_RESULT_LAST_UDM_DIVIDER', $this->new_udm_divider, array('permanent' => true)); } $lastDivider = $this->auth->getConfigValue('SETTINGS', 'GLOBAL_RESULT_LAST_UDM_DIVIDER', 1); $this->udm_divider = initVar('udm_divider', $lastDivider); if ($this->act != 'add') { $sql = "SELECT mu_type FROM ecogis.global_entry_data WHERE ge_id=" . (int) $this->ge_id; $vlu['mu_type'] = $db->query($sql)->fetchColumn(); $vlu['udm_divider'] = $this->udm_divider; $vlu['merge_municipality_data'] = $this->merge_municipality_data; $vlu['header'] = R3EcoGisGlobalTableHelper::getParameterList($this->kind); $vlu['header']['parameter_count'] = R3EcoGisGlobalTableHelper::getParameterCount($this->kind); $vlu['data'] = R3EcoGisGlobalTableHelper::getCategoriesData($this->ge_id, $this->kind, $this->udm_divider, true, $this->gc_id, $this->merge_municipality_data); } else { $vlu = array(); } $this->data = $vlu; // Save the data (prevent multiple sql) return $vlu; }