mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-12 01:50:48 +01:00
Fixed to work with multiple images
This commit is contained in:
parent
1283e51ca5
commit
034b288a13
@ -125,7 +125,7 @@
|
||||
$stats['unique_posters'] = number_format($query->fetchColumn());
|
||||
|
||||
// Active content
|
||||
$query = 'SELECT `files` FROM (';
|
||||
$query = 'SELECT DISTINCT(`files`) FROM (';
|
||||
foreach ($boards as &$_board) {
|
||||
if (in_array($_board['uri'], $this->excluded))
|
||||
continue;
|
||||
@ -135,8 +135,10 @@
|
||||
$query = query($query) or error(db_error());
|
||||
$files = $query->fetchAll();
|
||||
$stats['active_content'] = 0;
|
||||
foreach ($files as &$file)
|
||||
$stats['active_content'] += intval(preg_replace('/.*"size":([0-9]*).*/', '$1', $file[0]));
|
||||
foreach ($files as &$file) {
|
||||
preg_match_all('/"size":([0-9]*)/', $file[0], $matches);
|
||||
$stats['active_content'] += array_sum($matches[1]);
|
||||
}
|
||||
|
||||
return Element('themes/recent/recent.html', Array(
|
||||
'settings' => $settings,
|
||||
|
Loading…
Reference in New Issue
Block a user