Skip to content
Snippets Groups Projects
Commit e270c8a7 authored by Jan-Hendrik Willms's avatar Jan-Hendrik Willms
Browse files

fix StudipFileCache::getStats(), fixes #3699

Closes #3699

Merge request studip/studip!2568
parent 3952795a
No related branches found
No related tags found
No related merge requests found
...@@ -188,11 +188,16 @@ class FileCache extends Cache ...@@ -188,11 +188,16 @@ class FileCache extends Cache
*/ */
public function getStats(): array public function getStats(): array
{ {
$count = 0;
foreach (@glob($this->dir . '*', GLOB_ONLYDIR) as $current_dir){
$count += count(@glob("{$current_dir}/*"));
}
return [ return [
__CLASS__ => [ __CLASS__ => [
'name' => _('Anzahl Einträge'), 'name' => _('Anzahl Einträge'),
'value' => \DBManager::get()->fetchColumn("SELECT COUNT(*) FROM `cache`") 'value' => $count,
] ],
]; ];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment