mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
added/changed the way parameters are passed to uiinfolog.get_list and soinfolog.readIdArray
This commit is contained in:
parent
a6dca4b6ba
commit
b6d1e36b3d
@ -227,12 +227,11 @@
|
||||
return $this->so->anzSubs( $info_id );
|
||||
}
|
||||
|
||||
function readIdArray($order,$sort,$filter,$cat_id,$query,$action,$addr_id,
|
||||
$proj_id,$info_id,$ordermethod,&$start,&$total)
|
||||
function readIdArray($order,$sort,$filter,$cat_id,$query,$action,$action_id,
|
||||
$ordermethod,&$start,&$total)
|
||||
{
|
||||
return $this->so->readIdArray($order,$sort,$filter,$cat_id,$query,
|
||||
$action,$addr_id,$proj_id,$info_id,
|
||||
$ordermethod,$start,$total);
|
||||
$action,$action_id,$ordermethod,$start,$total);
|
||||
}
|
||||
|
||||
|
||||
|
@ -232,8 +232,8 @@
|
||||
return $this->db->f(0);
|
||||
}
|
||||
|
||||
function readIdArray($order,$sort,$filter,$cat_id,$query,$action,$addr_id,
|
||||
$proj_id,$info_id,$ordermethod,&$start,&$total)
|
||||
function readIdArray($order,$sort,$filter,$cat_id,$query,$action,$action_id,
|
||||
$ordermethod,&$start,&$total)
|
||||
{
|
||||
if ($order)
|
||||
{
|
||||
@ -254,9 +254,9 @@
|
||||
}
|
||||
switch ($action)
|
||||
{
|
||||
case 'addr': $filtermethod .= " AND info_addr_id=$addr_id ";
|
||||
case 'addr': $filtermethod .= " AND info_addr_id=$action_id ";
|
||||
break;
|
||||
case 'proj': $filtermethod .= " AND info_proj_id=$proj_id ";
|
||||
case 'proj': $filtermethod .= " AND info_proj_id=$action_id ";
|
||||
break;
|
||||
}
|
||||
if ($query) // we search in _from, _subject and _des for $query
|
||||
@ -264,7 +264,7 @@
|
||||
$sql_query = "AND (info_from like '%$query%' OR info_subject ".
|
||||
"like '%$query%' OR info_des like '%$query%') ";
|
||||
}
|
||||
$pid = 'AND info_id_parent='.($action == 'sp' ? $info_id : 0);
|
||||
$pid = 'AND info_id_parent='.($action == 'sp' ? $action_id : 0);
|
||||
|
||||
if (!$phpgw_info['user']['preferences']['infolog']['listNoSubs'] &&
|
||||
$action != 'sp')
|
||||
|
@ -304,16 +304,20 @@
|
||||
return $url['path'] . $qstr;
|
||||
}
|
||||
|
||||
function get_list($for_include=0)
|
||||
function get_list($for_include=0,$action='',$action_id=0)
|
||||
{
|
||||
global $cat_filter,$cat_id,$sort,$order,$query,$start,$filter;
|
||||
global $action,$addr_id,$proj_id,$info_id;
|
||||
|
||||
if (!$for_include)
|
||||
{
|
||||
$GLOBALS['phpgw']->common->phpgw_header();
|
||||
echo parse_navbar();
|
||||
}
|
||||
if ($action == '')
|
||||
{
|
||||
$action = get_var('action',array('GET','POST'));
|
||||
$action_id = get_var('action_id',array('GET','POST'));
|
||||
}
|
||||
$t = $this->template; $html = $this->html;
|
||||
|
||||
$t->set_file(array( 'info_list_t' => 'list.tpl' ));
|
||||
@ -338,20 +342,20 @@
|
||||
switch ($action)
|
||||
{
|
||||
case 'sp': // Sub-List
|
||||
$action_vars = array('action'=>'sp','info_id'=>$info_id);
|
||||
$action_vars = array('action'=>'sp','info_id'=>$action_id);
|
||||
$t->set_var(lang_info_action,lang('InfoLog - Subprojects from'));
|
||||
break;
|
||||
case 'proj':
|
||||
$action_vars += array( 'id_project' => $proj_id,
|
||||
'proj_id' => $proj_id);
|
||||
$proj = $this->bo->readProj($proj_id);
|
||||
$action_vars += array( 'id_project' => $action_id,
|
||||
'proj_id' => $action_id);
|
||||
$proj = $this->bo->readProj($action_id);
|
||||
$t->set_var(lang_info_action,lang('InfoLog').' - '.
|
||||
$proj['title']);
|
||||
break;
|
||||
case 'addr':
|
||||
$action_vars += array( 'id_addr' => $addr_id,
|
||||
'addr_id' => $addr_id );
|
||||
$addr = $this->bo->readAddr($addr_id);
|
||||
$action_vars += array( 'id_addr' => $action_id,
|
||||
'addr_id' => $action_id );
|
||||
$addr = $this->bo->readAddr($action_id);
|
||||
$t->set_var(lang_info_action,lang('InfoLog').' - '.
|
||||
$this->bo->addr2name($addr));
|
||||
break;
|
||||
@ -394,8 +398,7 @@
|
||||
// -------------- end header declaration -----------------
|
||||
|
||||
$ids = $this->bo->readIdArray($order,$sort,$filter,$cat_id,$query,
|
||||
$action,$addr_id,$proj_id,$info_id,
|
||||
$ordermethod,$start,$total);
|
||||
$action,$action_id,$ordermethod,$start,$total);
|
||||
|
||||
$maxmatchs = $GLOBALS['phpgw_info']['user']['preferences']['common']['maxmatchs'];
|
||||
if ($total > $maxmatchs)
|
||||
@ -420,14 +423,14 @@
|
||||
{
|
||||
case 'sp': // details of parent
|
||||
$t->set_var( $this->infoHeaders( ));
|
||||
$t->set_var( $this->formatInfo( $info_id ));
|
||||
$t->set_var( $this->formatInfo( $action_id ));
|
||||
$t->parse('projdetailshandle','projdetails',True);
|
||||
break;
|
||||
case 'addr':
|
||||
$nm_extra = "&addr_id=$addr_id";
|
||||
$nm_extra = "&action_id=$action_id";
|
||||
break;
|
||||
case 'proj':
|
||||
$nm_extra = "&proj_id=$proj_id";
|
||||
$nm_extra = "&action_id=$action_id";
|
||||
break;
|
||||
}
|
||||
|
||||
@ -503,7 +506,7 @@
|
||||
{
|
||||
$t->set_var('viewsub', $html->a_href(
|
||||
$this->icon('action','view'),'/index.php',
|
||||
$this->menuaction()+array( 'info_id' => $id,
|
||||
$this->menuaction()+array( 'action_id' => $id,
|
||||
'filter' => $filter, 'action' => 'sp')));
|
||||
}
|
||||
else // else display ADD SUB-Icon
|
||||
@ -522,7 +525,7 @@
|
||||
$t->set_var('viewparent',$html->a_href(
|
||||
$this->icon('action','parent'),'/index.php',
|
||||
$this->menuaction()+
|
||||
array('info_id' => $parent,
|
||||
array('action_id' => $parent,
|
||||
'filter' => $filter,'action' => 'sp')));
|
||||
}
|
||||
|
||||
|
@ -18,8 +18,7 @@
|
||||
|
||||
/* echo "<p>hook_addressbook_view(ab_id=$ab_id)</p>"; */
|
||||
|
||||
$GLOBALS['addr_id'] = $GLOBALS['ab_id']; $GLOBALS['action'] = 'addr';
|
||||
$infolog = CreateObject('infolog.uiinfolog');
|
||||
$infolog->get_list(True);
|
||||
$infolog->get_list(True,'addr',$GLOBALS['ab_id']);
|
||||
|
||||
$GLOBALS['phpgw_info']['flags']['currentapp'] = $save_app;
|
||||
|
@ -17,12 +17,9 @@
|
||||
|
||||
$phpgw->translation->add_app('infolog');
|
||||
|
||||
global $id;
|
||||
//echo "<p>hook_projects_view(id=$id)</p>";
|
||||
|
||||
global $proj_id,$action;
|
||||
$proj_id = $id; $action='proj';
|
||||
$infolog = CreateObject('infolog.uiinfolog');
|
||||
$infolog->get_list(True);
|
||||
$infolog->get_list(True,'proj',$GLOBALS['id']);
|
||||
|
||||
$phpgw_info['flags']['currentapp'] = $save_app;
|
||||
|
Loading…
Reference in New Issue
Block a user