phpgroupware-cvs
[Top][All Lists]
Advanced

[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.23, 1.36.2.15.2.24 class.soaddressbook.inc.php, 1.14.2.3.2.13, 1.14.2.3.2.14 class.boaddressbook.inc.php, 1.21.2.2.2.14, 1.21.2.2.2.15
Date: Sat, 11 Oct 2003 18:01:30 +0000

Update of /cvsroot/phpgroupware/addressbook/inc
In directory subversions:/tmp/cvs-serv23185/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 #5835 and others bug not reported in edit person and templates problems

Index: class.boaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.boaddressbook.inc.php,v
retrieving revision 1.21.2.2.2.14
retrieving revision 1.21.2.2.2.15
diff -C2 -d -r1.21.2.2.2.14 -r1.21.2.2.2.15
*** class.boaddressbook.inc.php 8 Oct 2003 23:02:11 -0000       1.21.2.2.2.14
--- class.boaddressbook.inc.php 11 Oct 2003 18:01:27 -0000      1.21.2.2.2.15
***************
*** 450,456 ****
                * separate the cats and extra tab
                */
!               function get_principal_persons_data($person_id)
                {
!                       $entry = 
$this->so->get_principal_persons_data($person_id);
                        
                        $entry[0]['tab_cats']['my_cats'] = explode(",", 
$entry[0]['cat_id']);
--- 450,456 ----
                * separate the cats and extra tab
                */
!               function get_principal_persons_data($person_id, $get_org=True)
                {
!                       $entry = 
$this->so->get_principal_persons_data($person_id, $get_org);
                        
                        $entry[0]['tab_cats']['my_cats'] = explode(",", 
$entry[0]['cat_id']);
***************
*** 612,620 ****
                }
  
!               function can_delete($contact_id, $function_data='')
                {
!                       $data = $this->$function_data($contact_id);
!                       if 
($this->so->contacts->check_perms($this->grants[$data['owner']],PHPGW_ACL_DELETE)
 || 
!                           $data['owner'] == 
$GLOBALS['phpgw_info']['user']['account_id'])
                        {
                                return True;
--- 612,619 ----
                }
  
!               function can_delete($contact_id, $owner='')
                {
!                       if 
($this->so->contacts->check_perms($this->grants[$owner],PHPGW_ACL_DELETE) || 
!                           $owner == 
$GLOBALS['phpgw_info']['user']['account_id'])
                        {
                                return True;

Index: class.soaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.soaddressbook.inc.php,v
retrieving revision 1.14.2.3.2.13
retrieving revision 1.14.2.3.2.14
diff -C2 -d -r1.14.2.3.2.13 -r1.14.2.3.2.14
*** class.soaddressbook.inc.php 5 Oct 2003 05:17:24 -0000       1.14.2.3.2.13
--- class.soaddressbook.inc.php 11 Oct 2003 18:01:27 -0000      1.14.2.3.2.14
***************
*** 345,353 ****
                        }
  
!                       $this->contacts->add_orgs_for_person($orgs['insert'], 
!                                                            
$orgs['preferred_org'], 
!                                                            
$fields['preferred_address'], 
!                                                            $person_id, 
PHPGW_SQL_RUN_SQL);
! 
                        $comm_preferred = $fields['tab_comms']['preferred'];
                        
--- 345,364 ----
                        }
  
!                       if(count($orgs['insert'])>0)
!                       {
!                               
$this->contacts->add_orgs_for_person($orgs['insert'], 
!                                                                    
$orgs['preferred_org'], 
!                                                                    
$fields['preferred_address'], 
!                                                                    
$person_id, PHPGW_SQL_RUN_SQL);
!                       }
!                       else
!                       {
!                               $data =  array('my_preferred' => 'N');
!                               $this->contacts->edit_org_person_relation('', 
$person_id, $data, PHPGW_SQL_RUN_SQL);
!                               $data = array('my_preferred' => 'Y',
!                                             'my_addr_id' => 
$fields['preferred_address']);
!                               
$this->contacts->edit_org_person_relation($orgs['preferred_org'], $person_id, 
$data, PHPGW_SQL_RUN_SQL);
!                       }
!                       
                        $comm_preferred = $fields['tab_comms']['preferred'];
                        
***************
*** 624,630 ****
                }
  
!               function get_principal_persons_data($id)
                {
!                       return $this->contacts->get_principal_persons_data($id);
                }
  
--- 635,641 ----
                }
  
!               function get_principal_persons_data($id, $get_org=True)
                {
!                       return $this->contacts->get_principal_persons_data($id, 
PHPGW_SQL_RUN_SQL, $get_org);
                }
  

Index: class.uiaddressbook.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/addressbook/inc/class.uiaddressbook.inc.php,v
retrieving revision 1.36.2.15.2.23
retrieving revision 1.36.2.15.2.24
diff -C2 -d -r1.36.2.15.2.23 -r1.36.2.15.2.24
*** class.uiaddressbook.inc.php 6 Oct 2003 03:16:00 -0000       1.36.2.15.2.23
--- class.uiaddressbook.inc.php 11 Oct 2003 18:01:27 -0000      1.36.2.15.2.24
***************
*** 112,116 ****
                        $this->_set_sessiondata();
                }
! 
                function _set_sessiondata()
                {
--- 112,116 ----
                        $this->_set_sessiondata();
                }
!               
                function _set_sessiondata()
                {
***************
*** 875,878 ****
--- 875,879 ----
                        $this->entry['old_tab'] = $this->tab;
                        $this->main_form($this->entry, $this->section, 
$this->tab);
+                       $GLOBALS['phpgw']->common->phpgw_exit();
                }               
                
***************
*** 1776,1780 ****
                                if($load_vars[$this->tab_person_data]=='db')
                                {
!                                       $entry = 
$this->bo->get_principal_persons_data($this->contact_id);
                                        $entry['ispublic'] = $entry['access'];
                                        
$this->save_tab_session($this->tab_cats, $entry['tab_cats']);
--- 1777,1781 ----
                                if($load_vars[$this->tab_person_data]=='db')
                                {
!                                       $entry = 
$this->bo->get_principal_persons_data($this->contact_id, False);
                                        $entry['ispublic'] = $entry['access'];
                                        
$this->save_tab_session($this->tab_cats, $entry['tab_cats']);
***************
*** 2453,2468 ****
                        if($contact_type == $this->tab_main_persons)
                        {
-                               $get_type_data='get_principal_persons_data';
                                $type = 'person';
                                $this->section = $this->tab_main_persons;
                        }
                        elseif($contact_type == $this->tab_main_organizations)
                        {
-                               
$get_type_data='get_principal_organizations_data';
                                $type = 'org';
                                $this->section = $this->tab_main_organizations;
                        }
  
!                       if(!$this->bo->can_delete($contact_id, $get_type_data))
                        {
                                Header('Location: '
--- 2454,2471 ----
                        if($contact_type == $this->tab_main_persons)
                        {
                                $type = 'person';
                                $this->section = $this->tab_main_persons;
+                               $data = 
$this->bo->get_principal_persons_data($contact_id, False);
                        }
                        elseif($contact_type == $this->tab_main_organizations)
                        {
                                $type = 'org';
                                $this->section = $this->tab_main_organizations;
+                               $data = 
$this->bo->get_principal_organizations_data($contact_id);
                        }
  
!                       $owner = $data['owner'];
!                       
!                       if(!$this->bo->can_delete($contact_id, $owner))
                        {
                                Header('Location: '
***************
*** 2486,2489 ****
--- 2489,2493 ----
                                  
$this->template->set_var('lang_yes',lang('YES'));
                                  $this->template->pparse('out','delete');
+                               $GLOBALS['phpgw']->common->phpgw_exit();
                          }
                          else
***************
*** 2494,2505 ****
                                                
'menuaction=addressbook.uiaddressbook.index&section='.$contact_type));
                          }
                }
                
!               function view_contact($contact_id, $contact_type='')
                {
                        $comms_media = array();
-                       
-                       $GLOBALS['phpgw']->common->phpgw_header();
-                       echo parse_navbar();
  
                        $contact_id = (empty($contact_id))? get_var('ab_id') : 
$contact_id;
--- 2498,2507 ----
                                                
'menuaction=addressbook.uiaddressbook.index&section='.$contact_type));
                          }
+ 
                }
                
!               function view_contact($contact_id='', $contact_type='')
                {
                        $comms_media = array();
  
                        $contact_id = (empty($contact_id))? get_var('ab_id') : 
$contact_id;
***************
*** 2511,2514 ****
--- 2513,2517 ----
                                $get_type_data='get_principal_persons_data';
                                $type = 'person';
+                               $contacts = 
$this->bo->$get_type_data($contact_id);
                        }
                        elseif($contact_type == $this->tab_main_organizations)
***************
*** 2516,2522 ****
                                
$get_type_data='get_principal_organizations_data';
                                $type = 'org';
                        }
-                       
-                       $contacts = $this->bo->$get_type_data($contact_id);
  
                        if(isset($contacts['tab_extra']) && 
is_array($contacts['tab_extra']))
--- 2519,2524 ----
                                
$get_type_data='get_principal_organizations_data';
                                $type = 'org';
+                               $contacts = 
$this->bo->$get_type_data($contact_id);
                        }
  
                        if(isset($contacts['tab_extra']) && 
is_array($contacts['tab_extra']))
***************
*** 2589,2592 ****
--- 2591,2597 ----
                        
$this->template->set_block('view_t','view_footer','view_footer');
                        
$this->template->set_block('view_t','view_buttons','view_buttons');
+ 
+                       $GLOBALS['phpgw']->common->phpgw_header();
+                       echo parse_navbar();
  
                        $this->template->set_var('lang_viewpref',lang('Address 
book - view'));





reply via email to

[Prev in Thread] Current Thread [Next in Thread]