[Rt-commit] rt branch, query-logging, updated. rt-3.9.4-59-g1f56ce0
Shawn Moore
sartak at bestpractical.com
Wed Sep 29 22:08:23 EDT 2010
The branch, query-logging has been updated
via 1f56ce0e38475ff770cdccfc9649eae999c6afb5 (commit)
from 22a3834041324f3d96fb80492304831b6c98f174 (commit)
Summary of changes:
share/html/Elements/Footer | 11 ++---------
share/html/Elements/QueriesAsComment | 11 +++++++++++
2 files changed, 13 insertions(+), 9 deletions(-)
create mode 100644 share/html/Elements/QueriesAsComment
- Log -----------------------------------------------------------------
commit 1f56ce0e38475ff770cdccfc9649eae999c6afb5
Author: Shawn M Moore <sartak at bestpractical.com>
Date: Wed Sep 29 22:11:25 2010 -0400
Factor logic out into a new component, QueriesAsComment
diff --git a/share/html/Elements/Footer b/share/html/Elements/Footer
index 195f1bd..9a1e50f 100755
--- a/share/html/Elements/Footer
+++ b/share/html/Elements/Footer
@@ -76,15 +76,8 @@
</pre>
% }
-% if (RT->Config->Get('StatementLog') && $session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser')) {
-<!--
-SQL queries:
-% for my $statement ($RT::Handle->SQLStatementLog) {
-% my ( $time, $sql, $bind, $duration ) = @$statement;
-<% sprintf '%0.4f', $duration %> - <% $RT::Handle->FillIn($sql, $bind) %>
-% }
--->
-% }
+<& /Elements/QueriesAsComment &>
+
</body>
</html>
diff --git a/share/html/Elements/QueriesAsComment b/share/html/Elements/QueriesAsComment
new file mode 100644
index 0000000..3d8e61e
--- /dev/null
+++ b/share/html/Elements/QueriesAsComment
@@ -0,0 +1,11 @@
+<%INIT>
+return unless RT->Config->Get('StatementLog')
+ && $session{'CurrentUser'}->HasRight( Object=> $RT::System, Right => 'SuperUser');
+</%INIT>
+<!--
+SQL queries:
+% for my $statement ($RT::Handle->SQLStatementLog) {
+% my ( $time, $sql, $bind, $duration ) = @$statement;
+<% sprintf '%0.4f', $duration %> - <% $RT::Handle->FillIn($sql, $bind) %>
+% }
+-->
-----------------------------------------------------------------------
More information about the Rt-commit
mailing list