Limit custom field app entry possibilities to apps that support query and title, which are required for custom field to work properly

This commit is contained in:
Klaus Leithoff 2012-01-06 15:34:47 +00:00
parent a98f6a29c5
commit bfd333b0c2

View File

@ -165,7 +165,7 @@ class customfields_widget
$cell['sel_options'][$lname] = lang($label); $cell['sel_options'][$lname] = lang($label);
$fields_with_vals[]=$lname; $fields_with_vals[]=$lname;
} }
$link_types = egw_link::app_list(); $link_types = array_intersect(egw_link::app_list('query'),egw_link::app_list('title'));
ksort($link_types); ksort($link_types);
foreach($link_types as $lname => $label) $cell['sel_options'][$lname] = '- '.$label; foreach($link_types as $lname => $label) $cell['sel_options'][$lname] = '- '.$label;
$cell['no_lang'] = true; $cell['no_lang'] = true;
@ -537,7 +537,7 @@ class customfields_widget
if (is_null($link_types)) if (is_null($link_types))
{ {
$link_types = array_keys(egw_link::app_list()); $link_types = array_keys(array_intersect(egw_link::app_list('query'),egw_link::app_list('title')));
$link_types[] = 'link-entry'; $link_types[] = 'link-entry';
} }
return $link_types; return $link_types;