Add logging to the Asset Content handler.
This commit is contained in:
parent
4e1f8bd5d5
commit
d59cdea8a7
1 changed files with 11 additions and 0 deletions
|
|
@ -170,6 +170,17 @@ sub page {
|
|||
$method = "view";
|
||||
}
|
||||
}
|
||||
##Passive Analytics Logging
|
||||
my $assetClass = $asset->get('className');
|
||||
$assetClass =~ s/^WebGUI::Asset:://;
|
||||
if ( $assetClass ne 'Snippet'
|
||||
&& substr($assetClass,0,4) ne 'File') {
|
||||
$session->db->write(
|
||||
q|INSERT INTO `passiveLog` (userId, sessionId, assetId, timestamp, url) VALUES (?,?,?,?,?)|,
|
||||
[ $session->user->userId, $session->getId, $asset->getId, time(), $session->request->uri,]
|
||||
);
|
||||
}
|
||||
|
||||
$output = tryAssetMethod($session,$asset,$method);
|
||||
$output = tryAssetMethod($session,$asset,"view") unless ($output || ($method eq "view"));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue