You are here

function boost_stats_add_access_log in Boost 6

Same name in this branch
  1. 6 stats/boost_stats.ajax.inc \boost_stats_add_access_log()
  2. 6 stats/boost_stats.php \boost_stats_add_access_log()

Add entry to access log

Parameters

$title: Title of page.

$q: URL directory structure

$referrer: Javascript referrer

$session_id: Session ID

$uid: User ID; should be 0.

2 calls to boost_stats_add_access_log()
boost_stats.php in stats/boost_stats.php
Place in webroot, for faster stats if needed.
boost_stats_ajax_callback in stats/boost_stats.ajax.inc
AJAX Menu Callback.

File

stats/boost_stats.ajax.inc, line 110
Boost & core stats logic

Code

function boost_stats_add_access_log($title, $q, $referer, $session_id, $uid) {
  db_query("INSERT INTO {accesslog} (title, path, url, hostname, uid, sid, timer, timestamp) values('%s', '%s', '%s', '%s', %d, '%s', %d, %d)", $title, $q, $referer, ip_address(), $uid, $session_id, timer_read('page'), time());
}