Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 298712

Empty Referrer String Should Produce Blank Output

$
0
0

I've been annoyed (for a while) that when you look at the Track tab on a node (say: node/10/track) if there are no referrers the page would display a long list of node/10/track as referrers.

I've tracked it down to function statistics_node_tracker() & the use of _statistics_link(). If we check to see if the $log->url is empty as I've done here:

    foreach ($result as $log) {
      $rows[] = array(
        array('data' => format_date($log->timestamp, 'short'), 'class' => array('nowrap')),
        (!empty($log->url)) ? _statistics_link($log->url) : '',
        theme('username', array('account' => $log)),
        l(t('details'), "admin/reports/access/$log->aid"),
      );
    }

The problem goes away and you just get a list of valid Referrer URLs.

I can do up a patch against D8 but wanted to run this by folks first. Seems like a simple fix.


Viewing all articles
Browse latest Browse all 298712

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>