mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-01-14 16:36:51 +01:00
Fix problema statistiche in Stato dei servizi
This commit is contained in:
parent
8a09c278ab
commit
a5a1768fee
@ -154,10 +154,10 @@ switch (filter('op')) {
|
||||
'description' => $description,
|
||||
'size' => $size,
|
||||
'formattedSize' => FileSystem::formatBytes($size),
|
||||
'count' => (FileSystem::fileCount($dir, ['htaccess']) ?: 0),
|
||||
'dbSize' => (($description == 'Allegati') ? $dbo->fetchOne('SELECT SUM(`size`) AS dbsize FROM zz_files')['dbsize'] : ''),
|
||||
'dbCount' => (($description == 'Allegati') ? $dbo->fetchOne('SELECT COUNT(`id`) AS dbcount FROM zz_files')['dbcount'] : ''),
|
||||
'dbExtensions' => (($description == 'Allegati') ? $dbo->fetchArray("SELECT SUBSTRING_INDEX(FILENAME, '.', -1) AS EXTENSION, COUNT(*) AS NUM FROM ZZ_FILES GROUP BY EXTENSION ORDER BY NUM DESC LIMIT 10") : ''),
|
||||
'count' => FileSystem::fileCount($dir, ['htaccess']) ?: 0,
|
||||
'dbSize' => ($description == 'Allegati') ? $dbo->fetchOne('SELECT SUM(`size`) AS dbsize FROM zz_files')['dbsize'] : '',
|
||||
'dbCount' => ($description == 'Allegati') ? $dbo->fetchOne('SELECT COUNT(`id`) AS dbcount FROM zz_files')['dbcount'] : '',
|
||||
'dbExtensions' => ($description == 'Allegati') ? $dbo->fetchArray("SELECT SUBSTRING_INDEX(filename, '.', -1) AS extension, COUNT(*) AS num FROM zz_files GROUP BY extension ORDER BY num DESC LIMIT 10") : '',
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user