From 1ebc3e04bae2027841e3cc98e0582946de521eaa Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Wed, 28 Nov 2001 03:42:56 +0000 Subject: [PATCH] Should fix this for GLOBALS --- addressbook/inc/hook_deleteaccount.inc.php | 6 +++--- calendar/inc/hook_deleteaccount.inc.php | 13 ++++--------- 2 files changed, 7 insertions(+), 12 deletions(-) diff --git a/addressbook/inc/hook_deleteaccount.inc.php b/addressbook/inc/hook_deleteaccount.inc.php index bbd79ba2dd..d07eb385cf 100644 --- a/addressbook/inc/hook_deleteaccount.inc.php +++ b/addressbook/inc/hook_deleteaccount.inc.php @@ -14,12 +14,12 @@ $contacts = CreateObject('phpgwapi.contacts'); - if(intval($GLOBALS['new_owner'])==0) + if(intval($GLOBALS['HTTP_POST_VARS']['new_owner'])==0) { - $contacts->delete_all(intval($GLOBALS['account_id'])); + $contacts->delete_all(intval($GLOBALS['HTTP_POST_VARS']['account_id'])); } else { - $contacts->change_owner(intval($GLOBALS['account_id']),intval($GLOBALS['new_owner'])); + $contacts->change_owner(intval($GLOBALS['HTTP_POST_VARS']['account_id']),intval($GLOBALS['HTTP_POST_VARS']['new_owner'])); } ?> diff --git a/calendar/inc/hook_deleteaccount.inc.php b/calendar/inc/hook_deleteaccount.inc.php index 73ee2728be..41c13455d9 100755 --- a/calendar/inc/hook_deleteaccount.inc.php +++ b/calendar/inc/hook_deleteaccount.inc.php @@ -10,21 +10,16 @@ * option) any later version. * \**************************************************************************/ /* $Id$ */ - - // Delete all records for a user - if (floor(phpversion()) == 4) - { - global $account_id, $new_owner; - } + // Delete all records for a user $cal = CreateObject('calendar.bocalendar'); - if(intval($new_owner)==0) + if(intval($GLOBALS['HTTP_POST_VARS']['new_owner'])==0) { - $cal->delete_calendar(intval($account_id)); + $cal->delete_calendar(intval($GLOBALS['HTTP_POST_VARS']['account_id'])); } else { - $cal->change_owner(intval($account_id),intval($new_owner)); + $cal->change_owner(intval($GLOBALS['HTTP_POST_VARS']['account_id']),intval($GLOBALS['HTTP_POST_VARS']['new_owner'])); } ?>