Skip to content

Commit

Permalink
issue #38: fix for log-import
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas--F authored Oct 3, 2016
1 parent ba3bb2c commit e59ca9a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions BotTracker.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ function addWidget()
WidgetsList::add('BotTracker_Widgets', 'BotTracker_DisplayWidget', 'BotTracker', 'displayWidget');
}

function checkBot(&$exclude)
function checkBot(&$exclude, $request)
{
$ua = getServer('HTTP_USER_AGENT');
$idSite = getRequest('idsite');
$ua = $request->getUserAgent();
$idSite = $request->getIdSite();
$currentTimestamp = gmdate("Y-m-d H:i:s");
$currentUrl = getRequest('url');
$currentUrl = $request->getParam('url');

BotTracker::logToFile('SiteID:'.$idSite.' user Agent: '.$ua.' TS:'.$currentTimestamp.' page:'.$currentUrl);

Expand Down Expand Up @@ -139,6 +139,7 @@ function checkBot(&$exclude)

public function logToFile($msg)
{
// to aktivate logging just change the value to "true".
$logActive = false;

if ($logActive){
Expand Down

0 comments on commit e59ca9a

Please sign in to comment.