[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: |
Jonathan Rivera <address@hidden> |
Subject: |
[Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.19, 1.36.2.15.2.20 class.soaddressbook.inc.php, 1.14.2.3.2.8, 1.14.2.3.2.9 class.boaddressbook.inc.php, 1.21.2.2.2.11, 1.21.2.2.2.12 |
Date: |
Fri, 26 Sep 2003 19:34:24 +0000 |
Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv23802/addressbook/inc
Modified Files:
Tag: Version-0_9_16-branch
class.uiaddressbook.inc.php class.soaddressbook.inc.php
class.boaddressbook.inc.php
Log Message:
General bugfix, i found some problems in edit and org and fix here.
Index: class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.21.2.2.2.11
retrieving revision 1.21.2.2.2.12
diff -C2 -d -r1.21.2.2.2.11 -r1.21.2.2.2.12
*** class.boaddressbook.inc.php 26 Sep 2003 05:32:03 -0000 1.21.2.2.2.11
--- class.boaddressbook.inc.php 26 Sep 2003 19:34:22 -0000 1.21.2.2.2.12
***************
*** 460,464 ****
$entry[0]['tab_extra']['per_initials'] =
$entry[0]['per_initials'];
$entry[0]['tab_extra']['per_pubkey'] =
$entry[0]['per_pubkey'];
!
unset($entry[0]['cat_id']);
unset($entry[0]['per_suffix']);
--- 460,464 ----
$entry[0]['tab_extra']['per_initials'] =
$entry[0]['per_initials'];
$entry[0]['tab_extra']['per_pubkey'] =
$entry[0]['per_pubkey'];
!
unset($entry[0]['cat_id']);
unset($entry[0]['per_suffix']);
***************
*** 504,508 ****
{
$entry =
$this->so->get_principal_organizations_data($org_id);
! $entry[0]['tab_cats']['my_cats'] = explode(",",
$entry[0]['cat_id']);
unset($entry[0]['cat_id']);
return $entry[0];
--- 504,508 ----
{
$entry =
$this->so->get_principal_organizations_data($org_id);
! $entry[0]['tab_cats']['my_cats'] = explode(",",
$entry[0]['cat_id']);
unset($entry[0]['cat_id']);
return $entry[0];
Index: class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14.2.3.2.8
retrieving revision 1.14.2.3.2.9
diff -C2 -d -r1.14.2.3.2.8 -r1.14.2.3.2.9
*** class.soaddressbook.inc.php 26 Sep 2003 05:32:03 -0000 1.14.2.3.2.8
--- class.soaddressbook.inc.php 26 Sep 2003 19:34:21 -0000 1.14.2.3.2.9
***************
*** 245,249 ****
$type =
$this->contacts->search_contact_type($this->contacts->get_person_name());
! $c_id = $this->contacts->add_contact($type, $fields,
$comms, $addr, $cats, $others, $orgs);
return $c_id;
--- 245,249 ----
$type =
$this->contacts->search_contact_type($this->contacts->get_person_name());
! $c_id = $this->contacts->add_contact($type, $principal,
$comms, $addr, $cats, $others, $orgs);
return $c_id;
***************
*** 254,258 ****
{
$principal = $fields['tab_org_data'];
!
foreach($fields['tab_comms']['comm_data'] as
$type_descr => $data)
{
--- 254,258 ----
{
$principal = $fields['tab_org_data'];
!
foreach($fields['tab_comms']['comm_data'] as
$type_descr => $data)
{
***************
*** 278,282 ****
$type =
$this->contacts->search_contact_type($this->contacts->get_org_name());
! $c_id = $this->contacts->add_contact($type, $fields,
$comms, $addr, $cats, $others, $persons);
return $c_id;
}
--- 278,282 ----
$type =
$this->contacts->search_contact_type($this->contacts->get_org_name());
! $c_id = $this->contacts->add_contact($type, $principal,
$comms, $addr, $cats, $others, $persons);
return $c_id;
}
***************
*** 287,299 ****
$principal['access'] =
$fields['tab_person_data']['ispublic'];
! foreach($fields['tab_cats']['my_cats'] as $cat)
{
! if($cat)
{
! $cats[] = $cat;
}
}
$principal['cat_id'] = $cats;
-
$person = array_merge($fields['tab_person_data'],
$fields['tab_extra']);
$orgs = $fields['edit_orgs'];
--- 287,306 ----
$principal['access'] =
$fields['tab_person_data']['ispublic'];
! if(is_array($fields['tab_cats']['my_cats']))
{
! foreach($fields['tab_cats']['my_cats'] as $cat)
{
! if($cat)
! {
! $cats[] = $cat;
! }
}
}
+ else
+ {
+ $cats = '';
+ }
+
$principal['cat_id'] = $cats;
$person = array_merge($fields['tab_person_data'],
$fields['tab_extra']);
$orgs = $fields['edit_orgs'];
***************
*** 340,356 ****
function edit_org($org_id, $fields)
{
-
$principal['owner'] = $fields['owner'];
! $principal['access'] =
$fields['tab_person_data']['ispublic'];
! foreach($fields['tab_cats']['my_cats'] as $cat)
{
! if($cat)
{
! $cats[] = $cat;
}
}
$principal['cat_id'] = $cats;
-
$org = $fields['tab_org_data'];
$persons = $fields['edit_persons'];
--- 347,369 ----
function edit_org($org_id, $fields)
{
$principal['owner'] = $fields['owner'];
! $principal['access'] =
$fields['tab_org_data']['ispublic'];
! if(is_array($fields['tab_cats']['my_cats']))
{
! foreach($fields['tab_cats']['my_cats'] as $cat)
{
! if($cat)
! {
! $cats[] = $cat;
! }
}
}
+ else
+ {
+ $cats = '';
+ }
+
$principal['cat_id'] = $cats;
$org = $fields['tab_org_data'];
$persons = $fields['edit_persons'];
***************
*** 365,368 ****
--- 378,382 ----
$this->contacts->add_people_for_organzation($persons['insert'], $org_id,
PHPGW_SQL_RUN_SQL);
+
$this->upgrade_comms($fields['edit_comms']['insert'],
$fields['edit_comms']['delete'],
Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.19
retrieving revision 1.36.2.15.2.20
diff -C2 -d -r1.36.2.15.2.19 -r1.36.2.15.2.20
*** class.uiaddressbook.inc.php 26 Sep 2003 05:32:03 -0000 1.36.2.15.2.19
--- class.uiaddressbook.inc.php 26 Sep 2003 19:34:21 -0000 1.36.2.15.2.20
***************
*** 500,503 ****
--- 500,511 ----
//get all vars which was send in post or get
$this->get_vars();
+
+ //check if is the first time that get into edit
+ if($this->firsttime)
+ {
+ $this->entry = '';
+ $this->clear_tab_session();
+ $this->load_tabs('cache');
+ }
//validate if add/edit/delete functions would be run
***************
*** 511,515 ****
{
$this->tab = $this->tab_person_data;
- $this->load_tabs('cache');
}
--- 519,522 ----
***************
*** 570,573 ****
--- 577,588 ----
//get all vars which was send in post or get
$this->get_vars();
+
+ //check if is the first time that get into edit
+ if($this->firsttime)
+ {
+ $this->entry = '';
+ $this->clear_tab_session();
+ $this->load_tabs('db');
+ }
//validate if add/edit/delete functions would be run
***************
*** 580,589 ****
if(!$this->tab)
{
- if($this->submit=='clear')
- {
- $this->submit = 'none';
- }
$this->tab = $this->tab_person_data;
- $this->load_tabs('db');
}
--- 595,599 ----
***************
*** 706,709 ****
--- 716,727 ----
$this->get_vars();
+ //check if is the first time that get into edit
+ if($this->firsttime)
+ {
+ $this->entry = '';
+ $this->clear_tab_session();
+ $this->load_tabs('cache');
+ }
+
//validate if add/edit/delete functions would be run
$this->managment_functions($this->action);
***************
*** 716,720 ****
{
$this->tab = $this->tab_org_data;
- $this->load_tabs('cache');
}
--- 734,737 ----
***************
*** 774,777 ****
--- 791,802 ----
$this->get_vars();
+ //check if is the first time that get into edit
+ if($this->firsttime)
+ {
+ $this->entry = '';
+ $this->clear_tab_session();
+ $this->load_tabs('db');
+ }
+
//validate if add/edit/delete functions would be run
$this->managment_functions($this->action);
***************
*** 783,792 ****
if(!$this->tab)
{
- if($this->submit=='clear')
- {
- $this->submit = 'none';
- }
$this->tab = $this->tab_org_data;
- $this->load_tabs('db');
}
--- 808,812 ----
***************
*** 798,804 ****
{
case 'save':
-
$this->save_tab_session($this->entry['old_tab'], $this->entry);
$fields = $this->get_all_entry();
!
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
--- 818,823 ----
{
case 'save':
$fields = $this->get_all_entry();
!
$fields['owner'] =
$GLOBALS['phpgw_info']['user']['account_id'];
***************
*** 825,828 ****
--- 844,848 ----
$this->entry = '';
$this->clear_tab_session();
+ $this->load_tabs('db');
break;
}
***************
*** 1621,1644 ****
function get_vars()
{
//set submit action
if(get_var('submit',array('get','post')))
{
$this->submit = 'save';
}
elseif(get_var('cancel',array('get','post')))
{
$this->submit = 'cancel';
}
elseif(get_var('delete',array('get','post')))
{
$this->submit = 'delete';
}
! elseif(get_var('principal_persons',array('get','post'))
||
! !get_var('bname', array('post', 'get')) ||
!
get_var('principal_organizations',array('get','post')))
! {
! $this->submit = 'clear';
! }
!
//set add/edit/delete action
if(get_var('address_add_row', array('get','post')))
--- 1641,1689 ----
function get_vars()
{
+ if(get_var('principal_persons',array('get','post')))
+ {
+ $this->submit = 'clear';
+ }
+
+
if(get_var('principal_organizations',array('get','post')))
+ {
+ $this->submit = 'clear';
+ }
+
+
if(!get_var('principal_organizations',array('get','post')) && !get_var('bname',
array('post', 'get')))
+ {
+ $this->firsttime = true;
+ }
+ else
+ {
+ $this->firsttime = false;
+ }
+
+ if(!get_var('principal_persons',array('get','post')) &&
!get_var('bname', array('post', 'get')))
+ {
+ $this->firsttime = true;
+ }
+ else
+ {
+ $this->firsttime = false;
+ }
+
//set submit action
if(get_var('submit',array('get','post')))
{
$this->submit = 'save';
+ $this->firsttime = false;
}
elseif(get_var('cancel',array('get','post')))
{
$this->submit = 'cancel';
+ $this->firsttime = false;
}
elseif(get_var('delete',array('get','post')))
{
$this->submit = 'delete';
+ $this->firsttime = false;
}
!
//set add/edit/delete action
if(get_var('address_add_row', array('get','post')))
***************
*** 1646,1649 ****
--- 1691,1695 ----
$this->action = 'add_addr';
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('other_add_row', array('get','post')))
***************
*** 1651,1654 ****
--- 1697,1701 ----
$this->action = 'add_other';
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('comm_edit_row', array('get','post')) >=
'0')
***************
*** 1656,1659 ****
--- 1703,1707 ----
$this->action = 'edit_comm';
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('comm_del_row', array('get','post')) >=
'0')
***************
*** 1661,1664 ****
--- 1709,1713 ----
$this->action = 'delete_comm';
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('addr_edit_row', array('get','post')) >=
'0')
***************
*** 1667,1670 ****
--- 1716,1720 ----
$this->addr_edit_row = get_var('addr_edit_row',
array('get','post'));
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('addr_del_row', array('get','post')) >=
'0')
***************
*** 1673,1676 ****
--- 1723,1727 ----
$this->addr_del_row = get_var('addr_del_row',
array('get','post'));
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('other_edit_row', array('get','post'))
>= '0')
***************
*** 1678,1681 ****
--- 1729,1733 ----
$this->action = 'edit_other';
$this->submit = 'none';
+ $this->firsttime = false;
}
elseif(get_var('other_del_row', array('get','post')) >=
'0')
***************
*** 1684,1687 ****
--- 1736,1740 ----
$this->other_del_row = get_var('other_del_row',
array('get','post'));
$this->submit = 'none';
+ $this->firsttime = false;
}
***************
*** 1712,1715 ****
--- 1765,1769 ----
{
$entry =
$this->bo->get_principal_persons_data($this->contact_id);
+ $entry['ispublic'] = $entry['access'];
$this->save_tab_session($this->tab_cats, $entry['tab_cats']);
$this->save_tab_session($this->tab_extra, $entry['tab_extra']);
***************
*** 1780,1783 ****
--- 1834,1838 ----
{
$entry =
$this->bo->get_principal_organizations_data($this->contact_id);
+ $entry['ispublic'] = $entry['access'];
$this->save_tab_session($this->tab_cats, $entry['tab_cats']);
unset($entry['tab_cats']);
***************
*** 2419,2422 ****
--- 2474,2479 ----
function view_contact($contact_id, $contact_type='')
{
+ $comms_media = array();
+
$GLOBALS['phpgw']->common->phpgw_header();
echo parse_navbar();
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] addressbook/inc class.uiaddressbook.inc.php, 1.36.2.15.2.19, 1.36.2.15.2.20 class.soaddressbook.inc.php, 1.14.2.3.2.8, 1.14.2.3.2.9 class.boaddressbook.inc.php, 1.21.2.2.2.11, 1.21.2.2.2.12,
Jonathan Rivera <address@hidden> <=