33 define(
'FIELD_TYPE_UDF_SELECT',1);
34 define(
'FIELD_TYPE_UDF_TEXT',2);
35 define(
'FIELD_TYPE_SELECT',3);
36 define(
'FIELD_TYPE_TEXT',4);
38 define(
'FIELD_TYPE_MULTI',5);
60 foreach(self::_getSearchableFieldsInfo($a_admin) as $field)
62 if(is_numeric($field[
'db']))
64 $field[
'db'] =
'udf_'.$field[
'db'];
67 $col_info[$field[
'db']] = array(
68 'txt' => $field[
'lang']
71 if($field[
'db'] ==
'login' or $field[
'db'] ==
'firstname' or $field[
'db'] ==
'lastname')
73 $col_info[$field[
'db']][
'default'] =
true;
84 $lng->loadLanguageModule(
'user');
96 $fields[$counter][
'values'] = array();
98 $fields[$counter][
'lang'] = $lng->txt($field);
99 $fields[$counter][
'db'] = $field;
104 $fields[$counter][
'autoComplete'] =
false;
111 $fields[$counter][
'autoComplete'] =
true;
115 $fields[$counter][
'lang'] = $lng->txt(
'person_title');
122 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'),
123 'f' => $lng->txt(
'gender_f'),
124 'm' => $lng->txt(
'gender_m'));
129 $fields[$counter][
'values'] = array(0 => $lng->txt(
'please_choose'));
132 $lng->loadLanguageModule(
'meta');
133 include_once(
'./Services/Utilities/classes/class.ilCountry.php');
136 $fields[$counter][
'values'][$c] = $lng->txt(
'meta_c_'.$c);
138 asort($fields[$counter][
'values']);
142 case 'interests_general':
143 case 'interests_help_offered':
144 case 'interests_help_looking':
167 return $fields ? $fields : array();
172 return array(
'gender',
189 'interests_help_offered',
190 'interests_help_looking'
206 if($a_key ==
'login')
211 return (
bool) $ilias->getSetting(
'search_enabled_'.$a_key);
218 $ilias->setSetting(
'search_enabled_'.$a_key,(
int) $a_enabled);
224 include_once
'./Services/User/classes/class.ilUserDefinedFields.php';
228 foreach($user_defined_fields->getSearchableDefinitions() as $definition)
231 $fields[$counter][
'lang'] = $definition[
'field_name'];
232 $fields[$counter][
'db'] = $definition[
'field_id'];
234 switch($definition[
'field_type'])
246 return $fields ? $fields : array();
253 $new_values = array(0 => $lng->txt(
'please_choose'));
254 foreach($a_values as $value)
256 $new_values[$value] = $value;
258 return $new_values ? $new_values : array();