mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-22 05:12:25 +01:00
Admin: change delete user home directory back to special case, getting actual file count takes way too long.
This commit is contained in:
parent
94a9290776
commit
a39d257eac
@ -302,10 +302,7 @@ class admin_account
|
|||||||
{
|
{
|
||||||
$entry = lang('Entries');
|
$entry = lang('Entries');
|
||||||
}
|
}
|
||||||
if($counts['total'] && (
|
if($counts['total'] && Api\Hooks::exists('deleteaccount', $app))
|
||||||
// Filemanager is a special case, since the hook is in API
|
|
||||||
Api\Hooks::exists('deleteaccount', $app) || in_array($app, array('filemanager'))
|
|
||||||
))
|
|
||||||
{
|
{
|
||||||
$content['delete_apps'][] = $app;
|
$content['delete_apps'][] = $app;
|
||||||
$sel_options['delete_apps'][] = array(
|
$sel_options['delete_apps'][] = array(
|
||||||
@ -322,6 +319,16 @@ class admin_account
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Add filemanager home directory in as special case, hook is in the API
|
||||||
|
if(Api\Vfs::file_exists('/home/'.$GLOBALS['egw']->accounts->id2name($content['account_id'])))
|
||||||
|
{
|
||||||
|
$app = 'filemanager';
|
||||||
|
$sel_options['delete_apps'][] = array(
|
||||||
|
'value' => $app,
|
||||||
|
'label' => lang($app) . ': ' . lang('home directory')
|
||||||
|
);
|
||||||
|
$content['delete_apps'][] = $app;
|
||||||
|
}
|
||||||
|
|
||||||
$tpl = new Etemplate('admin.account.delete');
|
$tpl = new Etemplate('admin.account.delete');
|
||||||
$tpl->exec('admin_account::delete', $content, $sel_options, array(), $preserve, 2);
|
$tpl->exec('admin_account::delete', $content, $sel_options, array(), $preserve, 2);
|
||||||
|
@ -1089,10 +1089,6 @@ class Accounts
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add filemanager as special case, since most of it is in Api
|
|
||||||
$files = Vfs::find('/', array('uid' => (int)$account_id, 'limit' => 50));
|
|
||||||
$counts['filemanager']['total'] = Vfs::$find_total;
|
|
||||||
|
|
||||||
return $counts;
|
return $counts;
|
||||||
}
|
}
|
||||||
protected function get_owner_columns()
|
protected function get_owner_columns()
|
||||||
|
Loading…
Reference in New Issue
Block a user