fix: advsearch in cat

This commit is contained in:
Cornelius Weiß 2006-04-05 13:53:37 +00:00
parent 5bef910835
commit 821f206962
3 changed files with 9 additions and 4 deletions

View File

@ -205,6 +205,10 @@ class socontacts
function search($criteria,$only_keys=True,$order_by='',$extra_cols='',$wildcard='',$empty=False,$op='AND',$start=false,$filter=null,$join='',$need_full_no_count=false)
{
//echo 'socontacts::search->criteria:'; _debug_array($criteria);
// we can only deal with one category atm.
$criteria['cat_id'] = $criteria['cat_id'][0];
if (empty($criteria['cat_id'])) unset($criteria['cat_id']);
// We just want to deal with generalized vars, to simpyfie porting of this code to so_sql later...
$this->main_id = $this->somain->contacts_id;

View File

@ -299,6 +299,7 @@ class uicontacts extends bocontacts
$GLOBALS['egw']->common->egw_exit();
}
$content['advs']['msg'] = lang('Please select only one category');
// This is no fun yet, as we dont have a sortorder in prefs now, AND as we are not able to sort within cf.
// $prefs = $GLOBALS['egw']->preferences->read_repository();
// foreach($prefs['addressbook'] as $key => $value)

View File

@ -79,9 +79,9 @@
$tpl =& new etemplate;
$tpl->init('*** generated advanced search widget','','',0,'',0,0); // make an empty template
if($extension_data['msg'])
if($extension_data['message'])
{
$tpl->add_child($tpl,$msg = $tpl->empty_cell('label','msg',array(
$tpl->add_child($tpl,$message = $tpl->empty_cell('label','message',array(
'no_lang' => true,
)));
}
@ -239,7 +239,7 @@
if($extension_data['actions'][$action]['type'] == 'button')
{
$result = $GLOBALS['egw']->session->appsession('advanced_search_result',$GLOBALS['egw_info']['flags']['currentapp']);
$extension_data['msg'] = ExecMethod2($extension_data['actions'][$action]['method'],$result);
$extension_data['message'] = ExecMethod2($extension_data['actions'][$action]['method'],$result);
}
}
}
@ -251,7 +251,7 @@
if($extension_data['row_actions'][$action]['type'] == 'button')
{
$result = $GLOBALS['egw']->session->appsession('advanced_search_result',$GLOBALS['egw_info']['flags']['currentapp']);
$extension_data['msg'] = ExecMethod2($extension_data['row_actions'][$action]['method'],key($id));
$extension_data['message'] = ExecMethod2($extension_data['row_actions'][$action]['method'],key($id));
}
}
}