[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.42
From: |
nomail |
Subject: |
[Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.42 |
Date: |
Wed, 23 Jun 2004 17:35:26 +0200 |
Update of /admin/inc
Modified Files:
Branch:
class.uiaccounts.inc.php
date: 2004/06/23 15:35:26; author: fipsfuchs; state: Exp; lines: +37 -32
Log Message:
user may cancel the delete action
=====================================================================
Index: admin/inc/class.uiaccounts.inc.php
diff -u admin/inc/class.uiaccounts.inc.php:1.41
admin/inc/class.uiaccounts.inc.php:1.42
--- admin/inc/class.uiaccounts.inc.php:1.41 Wed Jun 23 14:59:45 2004
+++ admin/inc/class.uiaccounts.inc.php Wed Jun 23 15:35:26 2004
@@ -954,46 +954,51 @@
$id2delete = $_REQUEST['account_id'];
- if($_REQUEST['deleteAccount'])
+ if(!$_REQUEST['deleteAccount'])
{
-
if($this->bo->delete_user($_REQUEST['deleteID'], $_REQUEST['account']))
+ $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
+
+ // get account list for new owner
+ $accounts = CreateObject('phpgwapi.accounts');
+ $accounts = $accounts->get_list('accounts');
+ for($i=0; $i < count($accounts); $i++)
{
- $this->list_users();
- }
- else
- {
- //what now?
+ if((int)$accounts[$i]['account_id'] !=
$id2delete)
+ {
+ $accountlist[] = array
+ (
+ 'account_id' =>
$accounts[$i]['account_id'],
+ 'account_name' =>
$GLOBALS['phpgw']->common->display_fullname($accounts[$i]['account_lid'],
+
$accounts[$i]['account_firstname'],
+
$accounts[$i]['account_lastname']
+
)
+ );
+ }
}
+ $data = array ('delete_id' => $id2delete,
+ 'accountlist' => $accountlist,
+ 'lang_new_owner' => lang('Who
would you like to transfer ALL records owned by the deleted user to?'),
+ 'l_cancel' =>
lang('cancel'),
+ 'l_delete' =>
lang('delete')
+ );
+
+
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('new_owner_list' => $data));
+ }
+ // if($_REQUEST['cancel']) the account will not be
deleted
+ if($_REQUEST['cancel'] ||
+ $this->bo->delete_user($_REQUEST['deleteID'],
$_REQUEST['account'])
+ )
+ {
+ $this->list_users();
}
- $GLOBALS['phpgw_info']['flags']['app_header'] =
lang('administration');
-
- // get account list for new owner
- $accounts = CreateObject('phpgwapi.accounts');
- $accounts = $accounts->get_list('accounts');
- for($i=0; $i < count($accounts); $i++)
+ else
{
- if((int)$accounts[$i]['account_id'] !=
$id2delete)
- {
- $accountlist[] = array
- (
- 'account_id' =>
$accounts[$i]['account_id'],
- 'account_name' =>
$GLOBALS['phpgw']->common->display_fullname($accounts[$i]['account_lid'],
-
$accounts[$i]['account_firstname'],
-
$accounts[$i]['account_lastname']
-
)
- );
- }
+ //error reporting is missing
+ $this->list_users();
}
- $data = array ('delete_id' => $id2delete,
- 'accountlist' => $accountlist,
- 'lang_new_owner' => lang('Who would you
like to transfer ALL records owned by the deleted user to?'),
- 'l_cancel' => lang('cancel'),
- 'l_delete' => lang('delete')
- );
-
-
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('new_owner_list' => $data));
}
+
function group_manager($cd='',$account_id='')
{
if
($GLOBALS['phpgw']->acl->check('group_access',16,'admin'))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] admin/inc/class.uiaccounts.inc.php, 1.42,
nomail <=