diff --git a/htdocs/lib/statistics.php b/htdocs/lib/statistics.php index 6527cdb4e302a6179f8d1dd333f4cd39a8f8c4ed..b09bc62f2ba6c6303c2745da16e6a04776b33569 100644 --- a/htdocs/lib/statistics.php +++ b/htdocs/lib/statistics.php @@ -206,10 +206,12 @@ function site_statistics($full=false) { ORDER BY blocks DESC", array(), 0, $maxblocktypes ); - foreach ($blocktypecounts as $blocktype) { - safe_require('blocktype', $blocktype->blocktype); - $classname = generate_class_name('blocktype', $blocktype->blocktype); - $blocktype->title = $classname::get_title(); + if (is_array($blocktypecounts)) { + foreach ($blocktypecounts as $blocktype) { + safe_require('blocktype', $blocktype->blocktype); + $classname = generate_class_name('blocktype', $blocktype->blocktype); + $blocktype->title = $classname::get_title(); + } } $smarty->assign('blocktypecounts', $blocktypecounts); diff --git a/htdocs/theme/raw/templates/admin/viewstatssummary.tpl b/htdocs/theme/raw/templates/admin/viewstatssummary.tpl index ef79c142ac343d7fb2671eebb6740da631836ddd..18ec9316ca9606f99210bed138f00cbcc1dc6237 100644 --- a/htdocs/theme/raw/templates/admin/viewstatssummary.tpl +++ b/htdocs/theme/raw/templates/admin/viewstatssummary.tpl @@ -8,7 +8,8 @@
  • {$item->title}: {$item->blocks}
  • {/foreach} - {if $viewtypes} +{/if} +{if $viewtypes}

    {str tag=viewsbytype section=admin}

    @@ -20,5 +21,4 @@ {/literal}
    - {/if} {/if}