From 7a885c8ffaa37fe767088e61a27df7972e0c4e78 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Sat, 14 Aug 2004 06:19:44 +0000 Subject: - Patch #10044 by TDobes: fixed broken links in the statistics module. In the current statistics.module, clicking a page title should lead to the appropriate page within the local site. Instead, it leads to a 404 because the / character is turned into %2F... this is due to the paths being passed through urlencode(). The attached patch removes the problematic calls to urlencode. --- modules/statistics/statistics.module | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/statistics/statistics.module') diff --git a/modules/statistics/statistics.module b/modules/statistics/statistics.module index 846dbe866..f8aa1ad89 100644 --- a/modules/statistics/statistics.module +++ b/modules/statistics/statistics.module @@ -241,9 +241,9 @@ function statistics_admin_displaylog($type = 'all', $id = 0) { // display title if possible, otherwise display path if ($log->title) - $title = l(_statistics_column_width($log->title), urlencode($log->path), array('title' => $log->path)); + $title = l(_statistics_column_width($log->title), $log->path, array('title' => $log->path)); else - $title = '('. l(_statistics_column_width($log->path), urlencode($log->path), array('title' => $log->path)) .')'; + $title = '('. l(_statistics_column_width($log->path), $log->path, array('title' => $log->path)) .')'; // display url if possible, constructing our own link as may not be local if ($log->url) @@ -284,7 +284,7 @@ function statistics_top_titles() { $result = pager_query($sql, 50, 0, $sql_cnt); while ($title = db_fetch_object($result)) { - $rows[] = array(l(_statistics_column_width($title->title, '_title', 56), urlencode($title->path)), _statistics_column_width($title->path, '_title', 56), $title->hits, format_date($title->last_hit, 'small'), ($title->title ? l(t('track title'), 'admin/logs/hits/page/'. urlencode($title->title)) : '')); + $rows[] = array(l(_statistics_column_width($title->title, '_title', 56), $title->path), _statistics_column_width($title->path, '_title', 56), $title->hits, format_date($title->last_hit, 'small'), ($title->title ? l(t('track title'), 'admin/logs/hits/page/'. urlencode($title->title)) : '')); } if ($pager = theme('pager', NULL, 50, 0, tablesort_pager())) { $rows[] = array(array('data' => $pager, 'colspan' => 3)); -- cgit v1.2.3