function forward_tracker in Forward 5
Same name and namespace in other branches
- 6 forward.module \forward_tracker()
- 7.3 forward.module \forward_tracker()
- 7 forward.module \forward_tracker()
- 7.2 forward.module \forward_tracker()
Email Tracker
1 string reference to 'forward_tracker'
- forward_menu in ./
forward.module - Menu Hooks
File
- ./
forward.module, line 320
Code
function forward_tracker() {
$path = drupal_get_normal_path($_GET['path']);
$args = explode('/', $path);
if ($args[0] == 'node' && is_numeric($args[1])) {
$nid = $args[1];
db_query("UPDATE {forward_statistics} SET clickthrough_count = clickthrough_count+1 WHERE nid = %d", $nid);
}
if ($path == variable_get('site_frontpage', 'node')) {
$path = '<front>';
}
db_query("INSERT INTO {forward_log} (path, type, timestamp) VALUES ('%s', '%s', %d)", $path, 'REF', time());
drupal_goto(drupal_get_path_alias($path));
}