forked from extern/egroupware
Rolling back filespace column
This commit is contained in:
parent
1fe026c4c0
commit
233d1640df
@ -97,8 +97,8 @@
|
|||||||
'lang_groups' => lang('Groups'),
|
'lang_groups' => lang('Groups'),
|
||||||
'lang_expires' => lang('Expires'),
|
'lang_expires' => lang('Expires'),
|
||||||
'lang_firstname' => lang('First Name'),
|
'lang_firstname' => lang('First Name'),
|
||||||
'lang_button' => lang('Save'),
|
'lang_button' => lang('Save')
|
||||||
'lang_file_space' => lang('File Space')
|
/* 'lang_file_space' => lang('File Space') */
|
||||||
);
|
);
|
||||||
$t->set_var($var);
|
$t->set_var($var);
|
||||||
$t->parse('form_buttons','form_buttons_',True);
|
$t->parse('form_buttons','form_buttons_',True);
|
||||||
@ -120,7 +120,8 @@
|
|||||||
$_y = $phpgw->sbox->getyears('account_expires_year',$userData['account_expires_year'],date('Y'),date('Y')+10);
|
$_y = $phpgw->sbox->getyears('account_expires_year',$userData['account_expires_year'],date('Y'),date('Y')+10);
|
||||||
$_m = $phpgw->sbox->getmonthtext('account_expires_month',$userData['account_expires_month']);
|
$_m = $phpgw->sbox->getmonthtext('account_expires_month',$userData['account_expires_month']);
|
||||||
$_d = $phpgw->sbox->getdays('account_expires_day',$userData['account_expires_day']);
|
$_d = $phpgw->sbox->getdays('account_expires_day',$userData['account_expires_day']);
|
||||||
|
|
||||||
|
/*
|
||||||
if (!$userData['file_space'])
|
if (!$userData['file_space'])
|
||||||
{
|
{
|
||||||
$userData['file_space'] = $phpgw_info['server']['vfs_default_account_size_number'] . "-" . $phpgw_info['server']['vfs_default_account_size_type'];
|
$userData['file_space'] = $phpgw_info['server']['vfs_default_account_size_number'] . "-" . $phpgw_info['server']['vfs_default_account_size_type'];
|
||||||
@ -143,6 +144,7 @@
|
|||||||
$t->set_var ('lang_file_space', "File space");
|
$t->set_var ('lang_file_space', "File space");
|
||||||
$t->set_var ('account_file_space', $account_file_space);
|
$t->set_var ('account_file_space', $account_file_space);
|
||||||
$t->set_var ('account_file_space_select', $account_file_space_select);
|
$t->set_var ('account_file_space_select', $account_file_space_select);
|
||||||
|
*/
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'input_expires' => $phpgw->common->dateformatorder($_y,$_m,$_d,True),
|
'input_expires' => $phpgw->common->dateformatorder($_y,$_m,$_d,True),
|
||||||
@ -177,7 +179,7 @@
|
|||||||
$groups_select .= '<option value="' . $value['account_id'] . '"';
|
$groups_select .= '<option value="' . $value['account_id'] . '"';
|
||||||
for ($i=0; $i<count($userGroups); $i++)
|
for ($i=0; $i<count($userGroups); $i++)
|
||||||
{
|
{
|
||||||
#print "Los1:".$userData["account_id"].$userGroups[$i]['account_id']." : ".$value['account_id']."<br>";
|
/* print "Los1:".$userData["account_id"].$userGroups[$i]['account_id']." : ".$value['account_id']."<br>"; */
|
||||||
if ($userGroups[$i]['account_id'] == $value['account_id'])
|
if ($userGroups[$i]['account_id'] == $value['account_id'])
|
||||||
{
|
{
|
||||||
$groups_select .= ' selected';
|
$groups_select .= ' selected';
|
||||||
@ -187,7 +189,7 @@
|
|||||||
}
|
}
|
||||||
$groups_select .= '</select>';
|
$groups_select .= '</select>';
|
||||||
|
|
||||||
// create list of available apps
|
/* create list of available apps */
|
||||||
$i = 0;
|
$i = 0;
|
||||||
|
|
||||||
$apps = CreateObject('phpgwapi.applications',$_account_id);
|
$apps = CreateObject('phpgwapi.applications',$_account_id);
|
||||||
@ -207,7 +209,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// create apps output
|
/* create apps output */
|
||||||
@reset($db_perms);
|
@reset($db_perms);
|
||||||
for ($i=0;$i<count($perm_display);$i++)
|
for ($i=0;$i<count($perm_display);$i++)
|
||||||
{
|
{
|
||||||
@ -262,7 +264,7 @@
|
|||||||
echo $t->fp('out','form');
|
echo $t->fp('out','form');
|
||||||
}
|
}
|
||||||
|
|
||||||
// stores the userdata
|
/* stores the userdata */
|
||||||
function saveUserData($_userData)
|
function saveUserData($_userData)
|
||||||
{
|
{
|
||||||
global $phpgw;
|
global $phpgw;
|
||||||
@ -312,9 +314,8 @@
|
|||||||
reset($allGroups);
|
reset($allGroups);
|
||||||
while (list($key,$groupData) = each($allGroups))
|
while (list($key,$groupData) = each($allGroups))
|
||||||
{
|
{
|
||||||
#print "$key,". $groupData['account_id'] ."<br>";
|
/* print "$key,". $groupData['account_id'] ."<br>";*/
|
||||||
|
/* print "$key,". $_userData['account_groups'][1] ."<br>"; */
|
||||||
#print "$key,". $_userData['account_groups'][1] ."<br>";
|
|
||||||
|
|
||||||
if ($newGroups[$groupData['account_id']])
|
if ($newGroups[$groupData['account_id']])
|
||||||
{
|
{
|
||||||
@ -328,9 +329,10 @@
|
|||||||
$phpgw->session->delete_cache(intval($_userData['account_id']));
|
$phpgw->session->delete_cache(intval($_userData['account_id']));
|
||||||
}
|
}
|
||||||
|
|
||||||
// checks if the userdata are valid
|
/* checks if the userdata are valid
|
||||||
// returns FALSE if the data are correct
|
returns FALSE if the data are correct
|
||||||
// otherwise the error array
|
otherwise the error array
|
||||||
|
*/
|
||||||
function userDataInvalid(&$_userData)
|
function userDataInvalid(&$_userData)
|
||||||
{
|
{
|
||||||
global $phpgw,$phpgw_info;
|
global $phpgw,$phpgw_info;
|
||||||
@ -387,11 +389,13 @@
|
|||||||
$_userData['expires'] = -1;
|
$_userData['expires'] = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
$check_account_file_space = explode ("-", $_userData['file_space']);
|
$check_account_file_space = explode ("-", $_userData['file_space']);
|
||||||
if (preg_match ("/\D/", $check_account_file_space[0]))
|
if (preg_match ("/\D/", $check_account_file_space[0]))
|
||||||
{
|
{
|
||||||
$error[$totalerrors++] = lang ('File space must be an integer');
|
$error[$totalerrors++] = lang ('File space must be an integer');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if ($totalerrors == 0)
|
if ($totalerrors == 0)
|
||||||
{
|
{
|
||||||
@ -465,8 +469,8 @@
|
|||||||
'loginshell' => $loginshell,
|
'loginshell' => $loginshell,
|
||||||
'account_expires_month' => $account_expires_month,
|
'account_expires_month' => $account_expires_month,
|
||||||
'account_expires_day' => $account_expires_day,
|
'account_expires_day' => $account_expires_day,
|
||||||
'account_expires_year' => $account_expires_year,
|
'account_expires_year' => $account_expires_year
|
||||||
'file_space' => $account_file_space_number . "-" . $account_file_space_type
|
/* 'file_space' => $account_file_space_number . "-" . $account_file_space_type */
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!$errors = userDataInvalid($userData))
|
if (!$errors = userDataInvalid($userData))
|
||||||
@ -540,7 +544,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$includedSomething = False;
|
$includedSomething = False;
|
||||||
// start inlcuding other admin tools
|
// start including other admin tools
|
||||||
while($app = each($apps_after))
|
while($app = each($apps_after))
|
||||||
{
|
{
|
||||||
$phpgw->common->hook_single('show_user_data', $app[0]);
|
$phpgw->common->hook_single('show_user_data', $app[0]);
|
||||||
|
@ -74,10 +74,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (preg_match ("/\D/", $account_file_space_number))
|
if (preg_match ("/\D/", $account_file_space_number))
|
||||||
{
|
{
|
||||||
$error = lang ('File space must be an integer');
|
$error = lang ('File space must be an integer');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
@ -269,6 +271,7 @@
|
|||||||
{
|
{
|
||||||
$group_repository['file_space'] = $phpgw_info['server']['vfs_default_account_size_number'] . "-" . $phpgw_info['server']['vfs_default_account_size_type'];
|
$group_repository['file_space'] = $phpgw_info['server']['vfs_default_account_size_number'] . "-" . $phpgw_info['server']['vfs_default_account_size_type'];
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
$file_space_array = explode ("-", $group_repository['file_space']);
|
$file_space_array = explode ("-", $group_repository['file_space']);
|
||||||
$account_file_space_number = $file_space_array[0];
|
$account_file_space_number = $file_space_array[0];
|
||||||
$account_file_space_type = $file_space_array[1];
|
$account_file_space_type = $file_space_array[1];
|
||||||
@ -287,7 +290,7 @@
|
|||||||
$p->set_var ('lang_file_space', "File space");
|
$p->set_var ('lang_file_space', "File space");
|
||||||
$p->set_var ('account_file_space', $account_file_space);
|
$p->set_var ('account_file_space', $account_file_space);
|
||||||
$p->set_var ('account_file_space_select', $account_file_space_select);
|
$p->set_var ('account_file_space_select', $account_file_space_select);
|
||||||
|
*/
|
||||||
$p->set_var('lang_permissions',lang('Permissions this group has'));
|
$p->set_var('lang_permissions',lang('Permissions this group has'));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -342,9 +345,9 @@
|
|||||||
$perm_html .= '<td colspan="4"> </td></tr>';
|
$perm_html .= '<td colspan="4"> </td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$p->set_var("permissions_list",$perm_html);
|
$p->set_var('permissions_list',$perm_html);
|
||||||
$p->set_var("lang_submit_button",lang("submit changes"));
|
$p->set_var('lang_submit_button',lang('submit changes'));
|
||||||
$p->pparse("out","form");
|
$p->pfp('out','form');
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
@ -92,10 +92,12 @@
|
|||||||
$account_expires = -1;
|
$account_expires = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (preg_match ("/\D/", $account_file_space_number))
|
if (preg_match ("/\D/", $account_file_space_number))
|
||||||
{
|
{
|
||||||
$error[$totalerrors++] = lang ('File space must be an integer');
|
$error[$totalerrors++] = lang ('File space must be an integer');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
@ -115,8 +117,8 @@
|
|||||||
'account_firstname' => $account_firstname,
|
'account_firstname' => $account_firstname,
|
||||||
'account_lastname' => $account_lastname,
|
'account_lastname' => $account_lastname,
|
||||||
'account_status' => $account_status,
|
'account_status' => $account_status,
|
||||||
'account_expires' => $account_expires,
|
'account_expires' => $account_expires
|
||||||
'account_file_space' => $account_file_space_number . "-" . $account_file_space_type,
|
/* 'account_file_space' => $account_file_space_number . "-" . $account_file_space_type */
|
||||||
);
|
);
|
||||||
$phpgw->accounts->create($account_info);
|
$phpgw->accounts->create($account_info);
|
||||||
|
|
||||||
@ -288,7 +290,7 @@
|
|||||||
|
|
||||||
$p->parse('form_buttons','form_buttons_',True);
|
$p->parse('form_buttons','form_buttons_',True);
|
||||||
|
|
||||||
// groups list
|
/* groups list */
|
||||||
$groups_select = '<select name="account_groups[]" multiple>';
|
$groups_select = '<select name="account_groups[]" multiple>';
|
||||||
|
|
||||||
$groups = $phpgw->accounts->get_list('groups');
|
$groups = $phpgw->accounts->get_list('groups');
|
||||||
@ -310,8 +312,9 @@
|
|||||||
}
|
}
|
||||||
$groups_select .= '</select>';
|
$groups_select .= '</select>';
|
||||||
$p->set_var('groups_select',$groups_select);
|
$p->set_var('groups_select',$groups_select);
|
||||||
// end groups list
|
/* end groups list */
|
||||||
|
|
||||||
|
/*
|
||||||
if (!$account_file_space_number)
|
if (!$account_file_space_number)
|
||||||
{
|
{
|
||||||
$account_file_space_number = $phpgw_info['server']['vfs_default_account_size_number'];
|
$account_file_space_number = $phpgw_info['server']['vfs_default_account_size_number'];
|
||||||
@ -335,6 +338,7 @@
|
|||||||
$p->set_var ('lang_file_space', "File space");
|
$p->set_var ('lang_file_space', "File space");
|
||||||
$p->set_var ('account_file_space', $account_file_space);
|
$p->set_var ('account_file_space', $account_file_space);
|
||||||
$p->set_var ('account_file_space_select', $account_file_space_select);
|
$p->set_var ('account_file_space_select', $account_file_space_select);
|
||||||
|
*/
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
$phpgw->applications->read_installed_apps();
|
$phpgw->applications->read_installed_apps();
|
||||||
|
@ -14,7 +14,10 @@
|
|||||||
$phpgw_info = array();
|
$phpgw_info = array();
|
||||||
if ($submit)
|
if ($submit)
|
||||||
{
|
{
|
||||||
$phpgw_info['flags'] = array('noheader' => True, 'nonavbar' => True);
|
$phpgw_info['flags'] = array(
|
||||||
|
'noheader' => True,
|
||||||
|
'nonavbar' => True
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
$phpgw_info['flags']['currentapp'] = 'admin';
|
$phpgw_info['flags']['currentapp'] = 'admin';
|
||||||
@ -63,10 +66,12 @@
|
|||||||
$account_expires = -1;
|
$account_expires = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
if (preg_match ("/\D/", $account_file_space_number))
|
if (preg_match ("/\D/", $account_file_space_number))
|
||||||
{
|
{
|
||||||
$error = lang ('File space must be an integer');
|
$error = lang ('File space must be an integer');
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
if (!$error)
|
if (!$error)
|
||||||
{
|
{
|
||||||
@ -233,10 +238,11 @@
|
|||||||
}
|
}
|
||||||
$account_file_space_select .= '</select>';
|
$account_file_space_select .= '</select>';
|
||||||
|
|
||||||
|
/*
|
||||||
$p->set_var ('lang_file_space', "File space");
|
$p->set_var ('lang_file_space', "File space");
|
||||||
$p->set_var ('account_file_space', $account_file_space);
|
$p->set_var ('account_file_space', $account_file_space);
|
||||||
$p->set_var ('account_file_space_select', $account_file_space_select);
|
$p->set_var ('account_file_space_select', $account_file_space_select);
|
||||||
|
*/
|
||||||
$p->set_var("lang_permissions",lang("Permissions this group has"));
|
$p->set_var("lang_permissions",lang("Permissions this group has"));
|
||||||
|
|
||||||
$i = 0;
|
$i = 0;
|
||||||
@ -287,9 +293,9 @@
|
|||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
$p->set_var("permissions_list",$perm_html);
|
$p->set_var('permissions_list',$perm_html);
|
||||||
$p->set_var("lang_submit_button",lang("Create Group"));
|
$p->set_var('lang_submit_button',lang('Create Group'));
|
||||||
$p->pparse("out","form");
|
$p->pfp('out','form');
|
||||||
|
|
||||||
$phpgw->common->phpgw_footer();
|
$phpgw->common->phpgw_footer();
|
||||||
?>
|
?>
|
||||||
|
Loading…
Reference in New Issue
Block a user