[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php, 1.
From: |
Jonathan Rivera <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.14, 1.36.2.15.2.15 class.soaddressbook.inc.php, 1.14.2.3.2.3, 1.14.2.3.2.4 class.boaddressbook.inc.php, 1.21.2.2.2.5, 1.21.2.2.2.6 |
Date: |
Fri, 12 Sep 2003 19:03:36 -0400 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv17672/addressbook/inc
Modified Files:
Tag: Version-0_9_16-branch
class.uiaddressbook.inc.php class.soaddressbook.inc.php
class.boaddressbook.inc.php
Log Message:
BugFix #5238 and generic modifications to calls, so i used
$this->bo->so->contacts but now i change to use $this->bo and add the functions
to bo and so classes.
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.14
retrieving revision 1.36.2.15.2.15
diff -C2 -r1.36.2.15.2.14 -r1.36.2.15.2.15
*** class.uiaddressbook.inc.php 11 Sep 2003 00:15:55 -0000 1.36.2.15.2.14
--- class.uiaddressbook.inc.php 12 Sep 2003 23:03:33 -0000 1.36.2.15.2.15
***************
*** 221,226 ****
{
$cat_to_find = array($this->cat_id);
! $cats = array_merge($cat_to_find,
$this->bo->so->contacts->get_sub_cats($cat_to_find));
! $persons =
$this->bo->so->contacts->get_persons_by_cat($cats);
if($persons)
{
--- 221,226 ----
{
$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)
{
***************
*** 304,308 ****
$criteria = array_merge($this->filters, $addr_filter,
$filter_person, $query_filter);
! $total_all_persons =
$this->bo->so->$count_function($criteria);
$entries = $this->bo->$get_data_function($fields,
$this->limit, $this->start, $this->order, $this->sort, $criteria);
--- 304,308 ----
$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);
***************
*** 313,317 ****
$contacts[] = $id['contact_id'];
}
! $this->entries_comm =
$this->bo->so->contacts->get_comm_contact_data($contacts, $fields_comms);
}
else
--- 313,317 ----
$contacts[] = $id['contact_id'];
}
! $this->entries_comm =
$this->bo->get_comm_contact_data($contacts, $fields_comms);
}
else
***************
*** 324,328 ****
while ($column = @each($columns_to_display))
{
! $showcol =
$this->bo->so->contacts->display_name($column[0]);
if (!$showcol) { $showcol = $column[1]; }
$cols .= '<td>';
--- 324,328 ----
while ($column = @each($columns_to_display))
{
! $showcol = $this->bo->display_name($column[0]);
if (!$showcol) { $showcol = $column[1]; }
$cols .= '<td>';
***************
*** 360,366 ****
1,1,1,array('filter'=>$this->filter,'yours'=>1),$this->cat_id);
$query = $filter = '';
!
//$lang_showing =
$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start);
! $lang_showing = lang('%1 - %2 of %3 user
accounts',$this->start+1,$this->start+$total_records,$total_all_persons);
$this->template->set_var('principal_tabs_inc',
$this->template->fp('out', 'principal_tab'));
--- 360,369 ----
1,1,1,array('filter'=>$this->filter,'yours'=>1),$this->cat_id);
$query = $filter = '';
!
!
//$lang_showing =
$GLOBALS['phpgw']->nextmatchs->show_hits($total_records,$this->start);
! $lang_showing = lang('%1 - %2 of %3 ' .
lang($this->section),
!
($total_records!=0)?$this->start+1:$this->start,
!
$this->start+$total_records,$total_all_persons);
$this->template->set_var('principal_tabs_inc',
$this->template->fp('out', 'principal_tab'));
***************
*** 476,480 ****
function get_comm_value($contact_id, $column)
{
! foreach($this->entries_comm as $comms)
{
if($contact_id == $comms['comm_contact_id'] &&
$column == $comms['comm_description'])
--- 479,483 ----
function get_comm_value($contact_id, $column)
{
! foreach($this->entries_comm['comm'] as $comms)
{
if($contact_id == $comms['comm_contact_id'] &&
$column == $comms['comm_description'])
***************
*** 548,554 ****
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->bo->so->edit_org($fields['contact_id'],
$fields);
!
$this->bo->so->contacts->execute_queries($fields['trans']);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 551,557 ----
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->bo->edit_org($fields['contact_id'],
$fields);
! $this->bo->execute_queries($fields['trans']);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 710,716 ****
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
!
$this->bo->so->edit_person($fields['contact_id'], $fields);
!
$this->bo->so->contacts->execute_queries($fields['trans']);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 713,719 ----
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
! $this->bo->edit_person($fields['contact_id'],
$fields);
! $this->bo->execute_queries($fields['trans']);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 833,838 ****
{
$confirm = get_var('confirm');
! $contact_type =
$contact_type?$contact_type:$this->bo->so->contacts->search_contact_type_id(
!
$this->bo->so->contacts->get_type_contact($contact_id));
if($contact_type == $this->tab_main_persons)
--- 836,841 ----
{
$confirm = get_var('confirm');
! $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)
***************
*** 876,880 ****
//$this->bo->delete_entry(array('id' =>
$ab_id));
//print 'delete';
! $this->bo->so->contacts->delete($contact_id,
$contact_type);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 879,883 ----
//$this->bo->delete_entry(array('id' =>
$ab_id));
//print 'delete';
! $this->bo->delete($contact_id, $contact_type);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 886,890 ****
{
$contact_id = get_var('ab_id');
! $new_contact_id =
$this->bo->so->contacts->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 889,893 ----
{
$contact_id = get_var('ab_id');
! $new_contact_id = $this->bo->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 895,899 ****
{
$contact_id = get_var('ab_id');
! $new_contact_id =
$this->bo->so->contacts->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 898,902 ----
{
$contact_id = get_var('ab_id');
! $new_contact_id = $this->bo->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 904,908 ****
{
$contact_id = get_var('ab_id');
! $new_contact_id =
$this->bo->so->contacts->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
--- 907,911 ----
{
$contact_id = get_var('ab_id');
! $new_contact_id = $this->bo->copy_contact($contact_id);
Header('Location: '
. $GLOBALS['phpgw']->link('/index.php',
***************
*** 912,916 ****
function view_person()
{
- //$person_id = $GLOBALS['HTTP_GET_VARS']['ab_id'];
$person_id = get_var('ab_id');
$this->view_contact($person_id,
$this->tab_main_persons);
--- 915,918 ----
***************
*** 919,923 ****
function view_org()
{
- //$org_id = $GLOBALS['HTTP_GET_VARS']['ab_id'];
$org_id = get_var('ab_id');
$this->view_contact($org_id,
$this->tab_main_organizations);
--- 921,924 ----
***************
*** 929,934 ****
echo parse_navbar();
! $contact_type =
$contact_type?$contact_type:$this->bo->so->contacts->search_contact_type_id(
!
$this->bo->so->contacts->get_type_contact($contact_id));
if($contact_type == $this->tab_main_persons)
--- 930,935 ----
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)
***************
*** 977,988 ****
$comms = $this->bo->get_comm_contact_data($contact_id);
!
unset($comms['comm']['load']);
! foreach($comms['comm'] as $key => $data)
! {
! $contacts[$data['comm_description']] =
$data['comm_data'];
}
! $addr =
$this->bo->so->contacts->get_addr_contact_data($contact_id,
array('addr_pref_val'=>'Y'));
unset($addr[0]['contact_id']);
--- 978,993 ----
$comms = $this->bo->get_comm_contact_data($contact_id);
!
unset($comms['comm']['load']);
! if(is_array($comms['comm']))
! {
! foreach($comms['comm'] as $key => $data)
! {
! $contacts[$data['comm_description']] =
$data['comm_data'];
! }
}
!
! $addr = $this->bo->get_addr_contact_data($contact_id,
array('addr_pref_val'=>'Y'));
unset($addr[0]['contact_id']);
***************
*** 1011,1015 ****
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$this->template->set_var('th_bg',$tr_color);
!
$this->template->set_var('display_col',$this->bo->so->contacts->display_name($field));
$this->template->set_var('ref_data',$data);
$this->template->parse('cols','view_row',True);
--- 1016,1020 ----
$tr_color =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($tr_color);
$this->template->set_var('th_bg',$tr_color);
!
$this->template->set_var('display_col',$this->bo->display_name($field));
$this->template->set_var('ref_data',$data);
$this->template->parse('cols','view_row',True);
Index: class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14.2.3.2.3
retrieving revision 1.14.2.3.2.4
diff -C2 -r1.14.2.3.2.3 -r1.14.2.3.2.4
*** class.soaddressbook.inc.php 10 Sep 2003 20:50:50 -0000 1.14.2.3.2.3
--- class.soaddressbook.inc.php 12 Sep 2003 23:03:33 -0000 1.14.2.3.2.4
***************
*** 186,193 ****
}
! //used
! function get_orgs_by_person($person_id)
{
! return
$this->contacts->get_organizations_by_person($person_id,
array('my_org_id','org_name'));
}
--- 186,197 ----
}
! function get_organizations_by_person($person_id, $criteria='')
{
! return
$this->contacts->get_organizations_by_person($person_id, $criteria);
! }
!
! function get_people_by_organizations($id, $criteria='')
! {
! return
$this->contacts->get_people_by_organizations($id, $criteria);
}
***************
*** 347,352 ****
{
return $prefs->org_columns;
! }
!
}
}
--- 351,460 ----
{
return $prefs->org_columns;
! }
! }
!
! function get_sub_cats($cat_to_find)
! {
! return $this->contacts->get_sub_cats($cat_to_find);
! }
!
! function get_persons_by_cat($cats)
! {
! return $this->contacts->get_persons_by_cat($cats);
! }
!
! function get_comm_contact_data($contacts, $fields_comms='')
! {
! return
$this->contacts->get_comm_contact_data($contacts, $fields_comms);
! }
!
! function display_name($column)
! {
! return $this->contacts->display_name($column);
! }
!
! function execute_queries($queries)
! {
! return $this->contacts->execute_queries($queries);
! }
!
! function search_contact_type_id($id)
! {
! return $this->contacts->search_contact_type_id($id);
! }
!
! function get_type_contact($contact_id)
! {
! return $this->contacts->get_type_contact($contact_id);
! }
!
! function delete($contact_id, $contact_type)
! {
! return $this->contacts->delete($contact_id,
$contact_type);
! }
!
! function copy_contact($contact_id)
! {
! return $this->contacts->copy_contact($contact_id);
! }
!
! function get_addr_contact_data($contact_id, $criteria='')
! {
! return
$this->contacts->get_addr_contact_data($contact_id, $criteria);
! }
!
! function get_principal_organizations_data($id)
! {
! return
$this->contacts->get_principal_organizations_data($id);
! }
!
! function get_principal_persons_data($id)
! {
! return $this->contacts->get_principal_persons_data($id);
! }
!
! function get_email($id)
! {
! return $this->contacts->get_email($id);
! }
!
! function get_phone($id)
! {
! return $this->contacts->get_phone($id);
! }
!
! function get_others_contact_data($id, $criteria='')
! {
! return $this->contacts->get_others_contact_data($id,
$criteria);
! }
!
! function add_others($fields, $contact_id)
! {
! return $this->contacts->add_others($fields,
$contact_id);
! }
!
! function edit_other($contact_id, $fields)
! {
! return $this->contacts->edit_other($contact_id,
$fields);
! }
!
! function add_communication_media($fields, $contact_id)
! {
! return
$this->contacts->add_communication_media($fields, $contact_id);
! }
!
! function edit_comms($contact_id, $fields)
! {
! return $this->contacts->edit_comms($contact_id,
$fields);
! }
!
! function add_location($fields, $contact_id)
! {
! return $this->contacts->add_location($fields,
$contact_id);
! }
!
! function edit_location($contact_id, $fields)
! {
! return $this->contacts->edit_location($contact_id,
$fields);
}
}
Index: class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.21.2.2.2.5
retrieving revision 1.21.2.2.2.6
diff -C2 -r1.21.2.2.2.5 -r1.21.2.2.2.6
*** class.boaddressbook.inc.php 10 Sep 2003 20:50:50 -0000 1.21.2.2.2.5
--- class.boaddressbook.inc.php 12 Sep 2003 23:03:33 -0000 1.21.2.2.2.6
***************
*** 426,435 ****
//used
- function get_orgs_by_person($person_id)
- {
- return $this->so->get_orgs_by_person($person_id);
- }
-
- //used
function add_person($fields)
{
--- 426,429 ----
***************
*** 445,449 ****
function get_principal_organizations_data($id)
{
! $entry =
$this->so->contacts->get_principal_organizations_data($id);
$entry[0]['load']='load';
$entry[0]['my_cats'] = explode(",",
$entry[0]['cat_id']);
--- 439,443 ----
function get_principal_organizations_data($id)
{
! $entry =
$this->so->get_principal_organizations_data($id);
$entry[0]['load']='load';
$entry[0]['my_cats'] = explode(",",
$entry[0]['cat_id']);
***************
*** 453,460 ****
function get_principal_persons_data($id)
{
! $entry =
$this->so->contacts->get_principal_persons_data($id);
! $email = $this->so->contacts->get_email($id);
! $phone = $this->so->contacts->get_phone($id);
$entry[0]['email'] = $email[0]['email'];
--- 447,454 ----
function get_principal_persons_data($id)
{
! $entry = $this->so->get_principal_persons_data($id);
! $email = $this->so->get_email($id);
! $phone = $this->so->get_phone($id);
$entry[0]['email'] = $email[0]['email'];
***************
*** 469,473 ****
{
//get orgs for this person
! $entry =
$this->so->contacts->get_organizations_by_person($id,
array('my_org_id','org_name', 'my_preferred'));
if($entry)
{
--- 463,467 ----
{
//get orgs for this person
! $entry = $this->so->get_organizations_by_person($id);
if($entry)
{
***************
*** 488,492 ****
{
//get orgs for this person
! $entry =
$this->so->contacts->get_people_by_organizations($id, array('my_person_id',
'per_first_name'));
if($entry)
{
--- 482,486 ----
{
//get orgs for this person
! $entry = $this->so->get_people_by_organizations($id);
if($entry)
{
***************
*** 502,534 ****
function get_others_contact_data($id)
{
! $entry['entry']['others'] =
$this->so->contacts->get_others_contact_data($id);
$entry['entry']['others']['load']='load';
return $entry['entry'];
}
! function get_comm_contact_data($id)
{
! $entry['entry']['comm'] =
$this->so->contacts->get_comm_contact_data($id);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
}
! function get_addr_contact_data($id)
{
! $entry['entry']['addr'] =
$this->so->contacts->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
}
! function get_others_person_data($id)
{
! $entry['entry']['others'] =
$this->so->contacts->get_others_contact_data($id);
$entry['entry']['others']['load']='load';
return $entry['entry'];
}
! function get_comm_person_data($id)
{
! $entry['entry']['comm'] =
$this->so->contacts->get_comm_contact_data($id);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
--- 496,528 ----
function get_others_contact_data($id)
{
! $entry['entry']['others'] =
$this->so->get_others_contact_data($id);
$entry['entry']['others']['load']='load';
return $entry['entry'];
}
! function get_comm_contact_data($contacts, $fields_comms='')
{
! $entry['entry']['comm'] =
$this->so->get_comm_contact_data($contacts, $fields_comms);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
}
! function get_addr_contact_data($id, $criteria='')
{
! $entry['entry']['addr'] =
$this->so->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
}
! function get_others_person_data($id, $criteria='')
{
! $entry['entry']['others'] =
$this->so->get_others_contact_data($id, $criteria);
$entry['entry']['others']['load']='load';
return $entry['entry'];
}
! function get_comm_person_data($id, $criteria='')
{
! $entry['entry']['comm'] =
$this->so->get_comm_contact_data($id, $criteria);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
***************
*** 537,541 ****
function get_addr_person_data($id)
{
! $entry['entry']['addr'] =
$this->so->contacts->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
--- 531,535 ----
function get_addr_person_data($id)
{
! $entry['entry']['addr'] =
$this->so->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
***************
*** 544,548 ****
function get_others_org_data($id)
{
! $entry['entry']['others'] =
$this->so->contacts->get_others_contact_data($id);
$entry['entry']['others']['load']='load';
return $entry['entry'];
--- 538,542 ----
function get_others_org_data($id)
{
! $entry['entry']['others'] =
$this->so->get_others_contact_data($id);
$entry['entry']['others']['load']='load';
return $entry['entry'];
***************
*** 551,555 ****
function get_comm_org_data($id)
{
! $entry['entry']['comm'] =
$this->so->contacts->get_comm_contact_data($id);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
--- 545,549 ----
function get_comm_org_data($id)
{
! $entry['entry']['comm'] =
$this->so->get_comm_contact_data($id);
$entry['entry']['comm']['load']='load';
return $entry['entry'];
***************
*** 558,562 ****
function get_addr_org_data($id)
{
! $entry['entry']['addr'] =
$this->so->contacts->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
--- 552,556 ----
function get_addr_org_data($id)
{
! $entry['entry']['addr'] =
$this->so->get_addr_contact_data($id);
$entry['entry']['addr']['load']='load';
return $entry['entry'];
***************
*** 579,583 ****
function get_insert_other($contact_id, $fields)
{
! return $this->so->contacts->add_others($fields,
$contact_id);
}
--- 573,577 ----
function get_insert_other($contact_id, $fields)
{
! return $this->so->add_others($fields, $contact_id);
}
***************
*** 585,594 ****
{
unset($fields['key_other_id']);
! return $this->so->contacts->edit_other($contact_id,
$fields);
}
function get_insert_comm($contact_id, $fields)
{
! return
$this->so->contacts->add_communication_media($fields, $contact_id);
}
--- 579,588 ----
{
unset($fields['key_other_id']);
! return $this->so->edit_other($contact_id, $fields);
}
function get_insert_comm($contact_id, $fields)
{
! return $this->so->add_communication_media($fields,
$contact_id);
}
***************
*** 596,605 ****
{
unset($fields['key_comm_id']);
! return $this->so->contacts->edit_comms($contact_id,
$fields);
}
function get_insert_addr($contact_id, $fields)
{
! return $this->so->contacts->add_location($fields,
$contact_id);
}
--- 590,599 ----
{
unset($fields['key_comm_id']);
! return $this->so->edit_comms($contact_id, $fields);
}
function get_insert_addr($contact_id, $fields)
{
! return $this->so->add_location($fields, $contact_id);
}
***************
*** 607,611 ****
{
unset($fields['key_addr_id']);
! return $this->so->contacts->edit_location($contact_id,
$fields);
}
function get_columns_to_display($contact_type)
--- 601,605 ----
{
unset($fields['key_addr_id']);
! return $this->so->edit_location($contact_id, $fields);
}
function get_columns_to_display($contact_type)
***************
*** 639,642 ****
--- 633,696 ----
{
return false;
+ }
+
+ function get_sub_cats($cat_to_find)
+ {
+ return $this->so->get_sub_cats($cat_to_find);
+ }
+
+ function get_persons_by_cat($cats)
+ {
+ return $this->so->get_persons_by_cat($cats);
+ }
+
+ function display_name($column)
+ {
+ return $this->so->display_name($column);
+ }
+
+ function execute_queries($queries)
+ {
+ return $this->so->execute_queries($queries);
+ }
+
+ function edit_org($org_id, $fields)
+ {
+ return $this->so->edit_org($org_id, $fields);
+ }
+
+ function edit_person($person_id, $fields)
+ {
+ return $this->so->edit_person($person_id, $fields);
+ }
+
+ function search_contact_type_id($id)
+ {
+ return $this->so->search_contact_type_id($id);
+ }
+
+ function get_type_contact($contact_id)
+ {
+ return $this->so->get_type_contact($contact_id);
+ }
+
+ function delete($contact_id, $contact_type)
+ {
+ return $this->so->delete($contact_id, $contact_type);
+ }
+
+ function copy_contact($contact_id)
+ {
+ return $this->so->copy_contact($contact_id);
+ }
+
+ function get_count_persons($criteria='')
+ {
+ return $this->so->get_count_persons($criteria);
+ }
+
+ function get_count_orgs($criteria='')
+ {
+ return $this->so->get_count_orgs($criteria);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.14, 1.36.2.15.2.15 class.soaddressbook.inc.php, 1.14.2.3.2.3, 1.14.2.3.2.4 class.boaddressbook.inc.php, 1.21.2.2.2.5, 1.21.2.2.2.6,
Jonathan Rivera <address@hidden> <=