diff --git a/modules/statistics.module b/modules/statistics.module index 4e4f2fb8c80f15633a204e0022ea05e571d059e1..c2011a23516e285d632a7fd752cc7d05f6508713 100644 --- a/modules/statistics.module +++ b/modules/statistics.module @@ -61,7 +61,7 @@ function statistics_referer_internal() { $output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' ORDER BY timestamp DESC LIMIT 15"); $output .= "<h3>Internal referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</h3>\n"; - $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC"); + $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC, timestamp"); return $output; } @@ -73,7 +73,7 @@ function statistics_referer_external() { $output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' ORDER BY timestamp DESC LIMIT 15"); $output .= "<h3>External referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</h3>\n"; - $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC"); + $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC, timestamp"); return $output; } diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 4e4f2fb8c80f15633a204e0022ea05e571d059e1..c2011a23516e285d632a7fd752cc7d05f6508713 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -61,7 +61,7 @@ function statistics_referer_internal() { $output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' ORDER BY timestamp DESC LIMIT 15"); $output .= "<h3>Internal referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</h3>\n"; - $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC"); + $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC, timestamp"); return $output; } @@ -73,7 +73,7 @@ function statistics_referer_external() { $output .= statistics_table_1("SELECT url, timestamp FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' ORDER BY timestamp DESC LIMIT 15"); $output .= "<h3>External referers of the last ". format_interval(variable_get("referer_clear", 604800)) ."</h3>\n"; - $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC"); + $output .= statistics_table_2("SELECT url, COUNT(url) AS count FROM referer WHERE url NOT LIKE '%". check_input($HTTP_HOST) ."%' GROUP BY url ORDER BY count DESC, timestamp"); return $output; }