allow to specify multiple, comma-speparated id's for the link-entry widget

This commit is contained in:
Ralf Becker 2006-10-23 11:22:15 +00:00
parent 32771223fe
commit c02a67c9af

View File

@ -338,13 +338,19 @@
{ {
list($app,$id) = explode(':',$value); list($app,$id) = explode(':',$value);
} }
if ($id && ($title = $this->link->title($app,$id))) $titles = array();
foreach(explode(',',$id) as $id)
{ {
if ($id && ($title = $this->link->title($app,$id)))
{
$titles[$id] = $title;
}
}
if ($titles)
{
$titles[''] = lang('new search').' ...';
$selectbox =& $tpl->get_widget_by_name('id'); $selectbox =& $tpl->get_widget_by_name('id');
$selectbox['sel_options'] = array( $selectbox['sel_options'] = $titles;
$id => $title,
'' => lang('new search').' ...',
);
// remove link_hide class from select-box-line // remove link_hide class from select-box-line
$span =& $tpl->get_cell_attribute('select_line','span'); $span =& $tpl->get_cell_attribute('select_line','span');
$span = str_replace('link_hide','',$span); $span = str_replace('link_hide','',$span);