migrate recalc.resource-usage

Signed-off-by: Michael Kaufmann <d00p@froxlor.org>
This commit is contained in:
Michael Kaufmann
2022-03-27 14:58:52 +02:00
parent 51ba6c757e
commit fb7091403c
2 changed files with 166 additions and 11 deletions

View File

@@ -150,17 +150,9 @@ if ($page == 'overview' && $userinfo['change_serversettings'] == '1') {
$log->logAction(\Froxlor\FroxlorLogger::ADM_ACTION, LOG_INFO, "updated resource-counters");
$updatecounters = \Froxlor\User::updateCounters(true);
$customers = '';
foreach ($updatecounters['customers'] as $customerid => $customer) {
eval("\$customers.=\"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters_row_customer") . "\";");
}
$admins = '';
foreach ($updatecounters['admins'] as $adminid => $admin) {
eval("\$admins.=\"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters_row_admin") . "\";");
}
eval("echo \"" . \Froxlor\UI\Template::getTemplate("settings/updatecounters") . "\";");
UI::view('user/resource-counter.html.twig', [
'counters' => $updatecounters
]);
} else {
\Froxlor\UI\HTML::askYesNo('admin_counters_reallyupdate', $filename, array(
'page' => $page