Using GLOBALS

This commit is contained in:
Miles Lott 2001-09-02 14:54:03 +00:00
parent 4d676d8259
commit d0c4053077
2 changed files with 5 additions and 17 deletions

View File

@ -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']));
}
?>

View File

@ -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']);
}
?>