get_prefix_id()) { return $this->get_prefix_id().'000'; } else { return 1000; } } public function array_subfields($id){ $array_subfields = array(); $authperso_id = substr(substr($id, 0, -3), 3); if ($id == $this->get_custom_fields_id()) { $query = "SELECT idchamp, CONCAT(authperso_name, ' - ', titre) AS titre FROM authperso_custom JOIN authperso ON num_type = id_authperso ".(!empty($authperso_id) ? "WHERE num_type= ".$authperso_id." " : "")." ORDER BY titre ASC"; $result = pmb_mysql_query($query); while ($row = pmb_mysql_fetch_object($result)) { $array_subfields[$row->idchamp] = $row->titre; } } else { $subfield_id = substr($id, 0, -4) . "0" . substr($id, 4); $array_subfields = $this->get_subfields_from_xml($subfield_id); } return $array_subfields; } }