Commit 1daeff70 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Display graph even if we only have 1 data point


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 038a8586
......@@ -198,7 +198,7 @@ function site_statistics() {
FROM {site_data}
WHERE ctime >= ? AND type IN (?,?,?)
ORDER BY ctime, type', $values);
if ($weekly && count($weekly) > count($values) - 1) {
if ($weekly) {
$data['weekly'] = array('user-count' => array(), 'group-count' => array(), 'view-count' => array());
$keys = array('user-count' => 0, 'group-count' => 0, 'view-count' => 0);
foreach ($weekly as &$r) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment