phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc hook_deleteaccount.inc.php,1.3,1.4


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc hook_deleteaccount.inc.php,1.3,1.4 class.bocalendar.inc.php,1.70,1.71
Date: Fri, 11 Jan 2002 20:33:42 -0500

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv11296/calendar/inc

Modified Files:
        hook_deleteaccount.inc.php class.bocalendar.inc.php 
Log Message:
Added change_owner to the xml-rpc/soap calls and changed the call to 
change_owner in deletaccount hook to use execmethod.

Index: hook_deleteaccount.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/hook_deleteaccount.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -r1.3 -r1.4
*** hook_deleteaccount.inc.php  28 Nov 2001 03:42:56 -0000      1.3
--- hook_deleteaccount.inc.php  12 Jan 2002 01:33:40 -0000      1.4
***************
*** 13,25 ****
  
        // Delete all records for a user
-       $cal = CreateObject('calendar.bocalendar');
- 
        if(intval($GLOBALS['HTTP_POST_VARS']['new_owner'])==0)
        {
!               
$cal->delete_calendar(intval($GLOBALS['HTTP_POST_VARS']['account_id']));
        }
        else
        {
!               
$cal->change_owner(intval($GLOBALS['HTTP_POST_VARS']['account_id']),intval($GLOBALS['HTTP_POST_VARS']['new_owner']));
        }
  ?>
--- 13,28 ----
  
        // Delete all records for a user
        if(intval($GLOBALS['HTTP_POST_VARS']['new_owner'])==0)
        {
!               
ExecMethod('calendar.bocalendar.delete_calendar',intval($GLOBALS['HTTP_POST_VARS']['account_id']));
        }
        else
        {
!               ExecMethod('calendar.bocalendar.change_owner',
!                       Array(
!                               'old_owner'     => 
intval($GLOBALS['HTTP_POST_VARS']['account_id']),
!                               'new_owner'     => 
intval($GLOBALS['HTTP_POST_VARS']['new_owner'])
!                       )
!               );
        }
  ?>

Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.70
retrieving revision 1.71
diff -C2 -r1.70 -r1.71
*** class.bocalendar.inc.php    10 Jan 2002 02:01:07 -0000      1.70
--- class.bocalendar.inc.php    12 Jan 2002 01:33:40 -0000      1.71
***************
*** 21,24 ****
--- 21,25 ----
                        'delete_entry' => True,
                        'delete_calendar'       => True,
+                       'change_owner'  => True,
                        'update'       => True,
                        'preferences'  => True,
***************
*** 53,56 ****
--- 54,65 ----
                                )
                        ),
+                       'change_owner' => Array(
+                               'in' => Array(
+                                       'array'
+                               ),
+                               'out' => Array(
+                                       'int'
+                               )
+                       ),
                        'update' => Array(
                                'in' => Array(
***************
*** 306,309 ****
--- 315,323 ----
                                                        'docstring' => 
lang('Delete an entire users calendar.')
                                                ),
+                                               'change_owner' => array(
+                                                       'function'  => 
'change_owner',
+                                                       'signature' => 
array(array(xmlrpcInt,xmlrpcStruct)),
+                                                       'docstring' => 
lang('Change all events for $params[\'old_owner\'] to $params[\'new_owner\'].')
+                                               ),
                                                'store_to_cache' => array(
                                                        'function'  => 
'store_to_cache',
***************
*** 494,502 ****
                }
  
!               function change_owner($account_id,$new_owner)
                {
                        if($GLOBALS['phpgw_info']['server']['calendar_type'] == 
'sql')
                        {
!                               $this->so->change_owner($account_id,$new_owner);
                        }
                }
--- 508,519 ----
                }
  
!               function change_owner($params='')
                {
                        if($GLOBALS['phpgw_info']['server']['calendar_type'] == 
'sql')
                        {
!                               if(is_array($params))
!                               {
!                                       
$this->so->change_owner($params['old_owner'],$params['new_owner']);
!                               }
                        }
                }




reply via email to

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