summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/autohandler5
-rw-r--r--httemplate/pref/pref-process.html3
-rw-r--r--httemplate/pref/pref.html4
3 files changed, 10 insertions, 2 deletions
diff --git a/httemplate/autohandler b/httemplate/autohandler
index bdea50534..ee37934cf 100644
--- a/httemplate/autohandler
+++ b/httemplate/autohandler
@@ -7,7 +7,10 @@
my $profile = '';
if ( UNIVERSAL::can(dbh, 'sprintProfile') ) {
- if ( lc($r->content_type) eq 'text/html' ) {
+ if ( lc($r->content_type) eq 'text/html'
+ && $FS::CurrentUser::CurrentUser->option('show_db_profile')
+ )
+ {
## barely worth it, just in case someone tries to use profiling on a
## non-RT install
diff --git a/httemplate/pref/pref-process.html b/httemplate/pref/pref-process.html
index 09eb71a7e..466218947 100644
--- a/httemplate/pref/pref-process.html
+++ b/httemplate/pref/pref-process.html
@@ -30,9 +30,10 @@
% my %param = $access_user->options;
%
% #XXX autogen
-% my @paramlist = qw( menu_position show_pkgnum
+% my @paramlist = qw( menu_position
% email_address
% vonage-fromnumber vonage-username vonage-password
+% show_pkgnum show_db_profile
% height width availHeight availWidth colorDepth
% );
%
diff --git a/httemplate/pref/pref.html b/httemplate/pref/pref.html
index 4007bb9f1..44b844891 100644
--- a/httemplate/pref/pref.html
+++ b/httemplate/pref/pref.html
@@ -64,6 +64,10 @@ Development
<TH>Show internal package numbers: </TH>
<TD><INPUT TYPE="checkbox" NAME="show_pkgnum" VALUE="1" <% $curuser->option('show_pkgnum') ? 'CHECKED' : '' %>></TD>
</TR>
+ <TR>
+ <TH>Show database profiling (when available): </TH>
+ <TD><INPUT TYPE="checkbox" NAME="show_db_profile" VALUE="1" <% $curuser->option('show_db_profile') ? 'CHECKED' : '' %>></TD>
+ </TR>
</TABLE>
<BR>