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());
|
$stats['unique_posters'] = number_format($query->fetchColumn());
|
||||||
|
|
||||||
// Active content
|
// Active content
|
||||||
$query = 'SELECT `files` FROM (';
|
$query = 'SELECT DISTINCT(`files`) FROM (';
|
||||||
foreach ($boards as &$_board) {
|
foreach ($boards as &$_board) {
|
||||||
if (in_array($_board['uri'], $this->excluded))
|
if (in_array($_board['uri'], $this->excluded))
|
||||||
continue;
|
continue;
|
||||||
@ -135,8 +135,10 @@
|
|||||||
$query = query($query) or error(db_error());
|
$query = query($query) or error(db_error());
|
||||||
$files = $query->fetchAll();
|
$files = $query->fetchAll();
|
||||||
$stats['active_content'] = 0;
|
$stats['active_content'] = 0;
|
||||||
foreach ($files as &$file)
|
foreach ($files as &$file) {
|
||||||
$stats['active_content'] += intval(preg_replace('/.*"size":([0-9]*).*/', '$1', $file[0]));
|
preg_match_all('/"size":([0-9]*)/', $file[0], $matches);
|
||||||
|
$stats['active_content'] += array_sum($matches[1]);
|
||||||
|
}
|
||||||
|
|
||||||
return Element('themes/recent/recent.html', Array(
|
return Element('themes/recent/recent.html', Array(
|
||||||
'settings' => $settings,
|
'settings' => $settings,
|
||||||
|
Loading…
Reference in New Issue
Block a user