refactor PassiveProfiling into using placeholders for speedup
This commit is contained in:
parent
1a6fde9d3f
commit
ecf6e51ad4
1 changed files with 10 additions and 11 deletions
|
|
@ -54,17 +54,16 @@ The assetId to add.
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub add {
|
sub add {
|
||||||
my $session = shift;
|
my $session = shift;
|
||||||
return unless ($session->setting->get("passiveProfilingEnabled"));
|
return unless ($session->setting->get("passiveProfilingEnabled"));
|
||||||
my $assetId = shift;
|
my $assetId = shift;
|
||||||
my $sql = "insert into passiveProfileLog (passiveProfileLogId, userId, sessionId, assetId, dateOfEntry)
|
$session->db->write("insert into passiveProfileLog (passiveProfileLogId, userId, sessionId, assetId, dateOfEntry) values (?,?,?,?,?)",
|
||||||
values (".$session->db->quote($session->id->generate()).",".
|
[
|
||||||
$session->db->quote($session->user->userId).",".
|
$session->id->generate(), $session->user->userId,
|
||||||
$session->db->quote($session->var->get("sessionId")).",".
|
$session->var->get("sessionId"), $assetId,
|
||||||
$session->db->quote($assetId).",".
|
$session->datetime->time(),
|
||||||
$session->db->quote($session->datetime->time()).")";
|
]);
|
||||||
$session->db->write($sql);
|
return;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue