mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-08 09:05:16 +01:00
Using GLOBALS
This commit is contained in:
parent
4d676d8259
commit
d0c4053077
@ -12,20 +12,14 @@
|
||||
|
||||
/* $Id$ */
|
||||
|
||||
// Delete all records for a user
|
||||
if (floor(phpversion()) == 4)
|
||||
{
|
||||
global $account_id, $new_owner;
|
||||
}
|
||||
|
||||
$contacts = CreateObject('phpgwapi.contacts');
|
||||
|
||||
if(intval($new_owner)==0)
|
||||
if(intval($GLOBALS['new_owner'])==0)
|
||||
{
|
||||
$contacts->delete_all(intval($account_id));
|
||||
$contacts->delete_all(intval($GLOBALS['account_id']));
|
||||
}
|
||||
else
|
||||
{
|
||||
$contacts->change_owner(intval($account_id),intval($new_owner));
|
||||
$contacts->change_owner(intval($GLOBALS['account_id']),intval($GLOBALS['new_owner']));
|
||||
}
|
||||
?>
|
||||
|
@ -11,14 +11,8 @@
|
||||
\**************************************************************************/
|
||||
/* $Id$ */
|
||||
|
||||
// Delete all records for a user
|
||||
if (floor(phpversion()) == 4)
|
||||
if($GLOBALS['account_id'])
|
||||
{
|
||||
global $phpgw, $account_id;
|
||||
}
|
||||
|
||||
if($account_id)
|
||||
{
|
||||
$phpgw->accounts->delete($account_id);
|
||||
$GLOBALS['phpgw']->accounts->delete($GLOBALS['account_id']);
|
||||
}
|
||||
?>
|
||||
|
Loading…
Reference in New Issue
Block a user