[Rt-commit] r11770 - rt/branches/3.7-RTIR-RELENG/html
ruz at bestpractical.com
ruz at bestpractical.com
Thu Apr 17 19:59:56 EDT 2008
Author: ruz
Date: Thu Apr 17 19:59:56 2008
New Revision: 11770
Modified:
rt/branches/3.7-RTIR-RELENG/html/autohandler
Log:
* it's pretty strange, but in Footer we call abort,
nobody knows why but we do that
Modified: rt/branches/3.7-RTIR-RELENG/html/autohandler
==============================================================================
--- rt/branches/3.7-RTIR-RELENG/html/autohandler (original)
+++ rt/branches/3.7-RTIR-RELENG/html/autohandler Thu Apr 17 19:59:56 2008
@@ -50,8 +50,9 @@
# Roll back any dangling transactions from a previous failed connection
$RT::Handle->ForceRollback() if $RT::Handle->TransactionDepth;
+my $log_sql_statements = RT->Config->Get('StatementLog');
-if (RT->Config->Get('StatementLog')) {
+if ( $log_sql_statements ) {
$RT::Handle->ClearSQLStatementLog;
$RT::Handle->LogSQLStatements(1);
}
@@ -294,9 +295,7 @@
$m->comp( { base_comp => $m->request_comp }, $m->fetch_next, %ARGS);
}
-$m->comp( '/Elements/Footer', %ARGS );
-
-if (RT->Config->Get('StatementLog')) {
+if ( $log_sql_statements ) {
my @log = $RT::Handle->SQLStatementLog;
$RT::Handle->ClearSQLStatementLog;
for my $stmt (@log) {
@@ -311,13 +310,15 @@
$duration = $bind;
}
$RT::Logger->log(
- level => RT->Config->Get('StatementLog'),
+ level => $log_sql_statements,
message => "SQL(" . sprintf( "%.2f", $duration ) . "s): $sql;"
. ( @bind ? " [ bound values: @{[map{qq|'$_'|} @bind]} ]" : "" )
);
}
}
+$m->comp( '/Elements/Footer', %ARGS );
+
</%INIT>
<%ARGS>
$user => undef
More information about the Rt-commit
mailing list