[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] api/class.account_mgr.php, 1.1.2.35
From: |
nomail |
Subject: |
[Phpgroupware-cvs] api/class.account_mgr.php, 1.1.2.35 |
Date: |
Sat, 8 May 2004 08:00:10 +0200 |
Update of /api
Modified Files:
Branch: proposal-branch
class.account_mgr.php
date: 2004/05/08 06:00:10; author: jengo; state: Exp; lines: +8 -9
Log Message:
Fixed delete account
=====================================================================
Index: api/class.account_mgr.php
diff -u api/class.account_mgr.php:1.1.2.34 api/class.account_mgr.php:1.1.2.35
--- api/class.account_mgr.php:1.1.2.34 Fri May 7 07:12:18 2004
+++ api/class.account_mgr.php Sat May 8 06:00:10 2004
@@ -483,6 +483,7 @@
$result['acl_options'] =
execMethod('api.acl_mgr.basic',array('account_id' => $args['account_id'],
'acl_check' => false));
$result['datamine'] =
execMethod('api.datamine._get','api.account_mgr.' . $args['account_id']);
+ $result['datamine_location'] = 'api.account_mgr.view.'
. $args['account_id'];
return $result;
}
@@ -531,20 +532,18 @@
$GLOBALS['phpgw']->acl->db =
&$GLOBALS['phpgw']->db;
$GLOBALS['phpgw']->history->db =
&$GLOBALS['phpgw']->db;
- $GLOBALS['phpgw']->db->transaction_begin();
- $account_result =
$GLOBALS['phpgw']->accounts->delete($args['account_id']);
- $acl_result =
$GLOBALS['phpgw']->acl->delete_account_rights($args['account_id']);
- $history_result =
execMethod('api.history.clear','api.accounts.' . $args['account_id']);
+ $GLOBALS['phpgw']->db->begintrans();
+
$GLOBALS['phpgw']->accounts->delete($args['account_id']);
+
$GLOBALS['phpgw']->acl->_delete_account_rights($args['account_id']);
+ execMethod('api.history.clear','api.accounts.'
. $args['account_id']);
- if ($account_result && $acl_result &&
$history_result)
+ if ($GLOBALS['phpgw']->db->committrans())
{
-
$GLOBALS['phpgw']->db->transaction_commit();
$GLOBALS['msgbox']->add(lang('The user
%s has been deleted successfully',$account_lid), 'notice');
}
else
{
-
$GLOBALS['phpgw']->db->transaction_abort();
- $GLOBALS['msgbox']->add(lang('There was
a problem deleting the account %s',$account_lid), 'warning');
+ trigger_error(lang('There was a problem
deleting the account %s',$account_lid),E_USER_WARNING);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] api/class.account_mgr.php, 1.1.2.35,
nomail <=