Fixed bug in visitor's tracking

This commit is contained in:
Dmitriy Simushev 2012-03-17 14:39:58 +00:00
parent 1681690d27
commit 9e871ee587

View File

@ -49,12 +49,12 @@ function track_visitor_start($entry, $referer, $link)
db_escape_string($visitor['name']), db_escape_string($visitor['name']),
db_escape_string($entry), db_escape_string($entry),
db_escape_string(track_build_details())), $link); db_escape_string(track_build_details())), $link);
$id = db_insert_id($link);
if ($SESSION['visitorid']) { if ($id) {
track_visit_page($SESSION['visitorid'], $referer, $link); track_visit_page($id, $referer, $link);
} }
$id = db_insert_id($link);
return $id ? $id : 0; return $id ? $id : 0;
} }