[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.1
From: |
Dave Hall <address@hidden> |
Subject: |
[Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.16, 1.36.2.15.2.17 |
Date: |
Thu, 25 Sep 2003 23:52:55 +0000 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv5341
Modified Files:
Tag: Version-0_9_16-branch
class.uiaddressbook.inc.php
Log Message:
Fixes for bugs 5144, 5148, 5518 - from eald
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.16
retrieving revision 1.36.2.15.2.17
diff -C2 -d -r1.36.2.15.2.16 -r1.36.2.15.2.17
*** class.uiaddressbook.inc.php 16 Sep 2003 18:44:14 -0000 1.36.2.15.2.16
--- class.uiaddressbook.inc.php 25 Sep 2003 23:52:52 -0000 1.36.2.15.2.17
***************
*** 179,192 ****
{
case 'yours':
! $this->filters = array('owner' =>
$GLOBALS['phpgw_info']['user']['account_id']);
break;
case 'private':
! $this->filters = array('access' => 'private',
'owner' => $GLOBALS['phpgw_info']['user']['account_id']);
break;
default:
! $this->filters = array('owner' =>
array_keys($this->bo->grants));
}
! $GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
--- 179,192 ----
{
case 'yours':
! $this->access = PHPGW_CONTACTS_MINE;
break;
case 'private':
! $this->access = PHPGW_CONTACTS_PRIVATE;
break;
default:
! $this->access = PHPGW_CONTACTS_ALL;
}
! $GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
***************
*** 220,236 ****
if($this->cat_id && $this->cat_id!=-1)
{
! $cat_to_find = array($this->cat_id);
! $cats = array_merge($cat_to_find,
$this->bo->get_sub_cats($cat_to_find));
! $persons = $this->bo->get_persons_by_cat($cats);
! if($persons)
! {
! $filter_person = array('contact_id' =>
$persons);
! }
! else
! {
! $filter_person = array('cat_id' =>
$cat_to_find);
! }
}
!
$columns_to_display =
$this->bo->get_columns_to_display($this->section);
--- 220,230 ----
if($this->cat_id && $this->cat_id!=-1)
{
! $category_filter = $this->cat_id;
}
! else
! {
! $category_filter =
PHPGW_CONTACTS_CATEGORIES_ALL;
! }
!
$columns_to_display =
$this->bo->get_columns_to_display($this->section);
***************
*** 289,310 ****
$fields['contact_id']='contact_id';
! $addr_filter = array('addr_pref_val'=>'Y');
!
! if($this->query)
! {
! foreach($fields as $field)
! {
! $query_filter[$field] = $this->query;
! }
! }
!
! unset($query_filter['contact_id']);
! unset($query_filter['owner']);
!
! $criteria = array_merge($this->filters, $addr_filter,
$filter_person, $query_filter);
!
$total_all_persons =
$this->bo->$count_function($criteria);
$entries = $this->bo->$get_data_function($fields,
$this->limit, $this->start, $this->order, $this->sort, $criteria);
!
if (is_array($entries))
{
--- 283,290 ----
$fields['contact_id']='contact_id';
! $criteria = $this->bo->criteria_contacts($this->access,
$category_filter, $fields, $this->query);
$total_all_persons =
$this->bo->$count_function($criteria);
$entries = $this->bo->$get_data_function($fields,
$this->limit, $this->start, $this->order, $this->sort, $criteria);
!
if (is_array($entries))
{
***************
*** 464,470 ****
$this->template->set_var('row_edit',' ');
}
!
$this->template->set_var('row_owner',$GLOBALS['phpgw']->accounts->id2name($myowner));
-
$this->template->parse('rows','row',True);
$this->template->pparse('out','row');
--- 444,449 ----
$this->template->set_var('row_edit',' ');
}
!
$this->template->set_var('row_owner',$GLOBALS['phpgw']->accounts->id2name($myowner));
$this->template->parse('rows','row',True);
$this->template->pparse('out','row');
***************
*** 710,714 ****
$this->tab = get_var('bname');
$this->entry = get_var('entry');
-
if (get_var('submit'))
{
--- 689,692 ----
***************
*** 931,942 ****
}
! function view_contact($contact_id, $contact_type='')
{
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
!
$contact_type =
$contact_type?$contact_type:$this->bo->search_contact_type_id(
$this->bo->get_type_contact($contact_id));
!
if($contact_type == $this->tab_main_persons)
{
--- 909,920 ----
}
! function view_contact($contact_id='', $contact_type='')
{
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
! $contact_id = (empty($contact_id))? get_var('ab_id') :
$contact_id;
$contact_type =
$contact_type?$contact_type:$this->bo->search_contact_type_id(
$this->bo->get_type_contact($contact_id));
!
if($contact_type == $this->tab_main_persons)
{
***************
*** 949,957 ****
$type = 'org';
}
!
! $contacts = $this->bo->$get_type_data($contact_id);
$owner=$contacts['owner'];
! $cats=$contacts['my_cats'];
$access=$contacts['access'];
--- 927,935 ----
$type = 'org';
}
! // FIXME, when become from Accounts you don't know
which type of contact is :P
! $contacts = $this->bo->$get_type_data($contact_id);
$owner=$contacts['owner'];
! $cats=(is_array($contacts['my_cats'])) ?
$contacts['my_cats'] : array();
$access=$contacts['access'];
***************
*** 984,988 ****
$comms = $this->bo->get_comm_contact_data($contact_id);
-
unset($comms['comm']['load']);
if(is_array($comms['comm']))
--- 962,965 ----
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.16, 1.36.2.15.2.17,
Dave Hall <address@hidden> <=