I see the following in the HTML source:

/style type="text/css">@import url(modules/statistics_trends/statistics_trends.css);</style>
/style type="text/css">@import url(modules/statistics_trends/statistics_trends.css);</style>
/style type="text/css">@import url(modules/statistics_trends/statistics_trends.css);</style>
/style type="text/css">@import url(modules/statistics_trends/statistics_trends.css);</style>
/style type="text/css">@import url(modules/statistics_trends/statistics_trends.css);</style>

There should only be one instance of the above line.

Comments

kbahey’s picture

Status: Active » Needs review

Here is a patch that fixes this issue.

--- statistics_trends.module.orig       2005-07-26 03:28:47.000000000 -0400
+++ statistics_trends.module    2005-07-26 03:32:10.000000000 -0400
@@ -75,6 +75,7 @@

 function _statistics_trends_display($period, $limit, $header) {
   $output = '';
+  static $set_html_head = false;
   if ($limit) {
     $rows = array();
     $q = 'SELECT CEILING((%d-timestamp)/%d) AS period, COUNT(*) AS hits '.
@@ -83,7 +84,10 @@
     $time = time();
     $result = db_query ($q, $time, $period, $time-$limit*$period);
     if (variable_get('statistics_trends_graph', FALSE)) {
-      drupal_set_html_head(statistics_trends_html_head());
+      if (!$set_html_head) {
+        $set_html_head = true;
+        drupal_set_html_head(statistics_trends_html_head());
+      }
       $maxhits = 0;
       $output .= '<table class="statistics-trends"><tr><th colspan="'.$limit.'">'.$limit.' '.$header.'</th></tr>';
       while ( $row = db_fetch_object ( $result ) ) {
mikeryan’s picture

Status: Needs review » Closed (fixed)

Already fixed, please download the latest version of the module.

Thanks.