Added: Google map asset.
Added a way for authors to prevent debugging output on page requests
This commit is contained in:
parent
77a273c954
commit
25ff0dae0e
9 changed files with 513 additions and 98 deletions
|
|
@ -121,6 +121,9 @@ sub canShowDebug {
|
|||
##This check prevents in infinite loop during startup.
|
||||
return 0 unless ($self->session->hasSettings);
|
||||
|
||||
# Allow programmers to stop debugging output for certain requests
|
||||
return 0 if $self->{_preventDebugOutput};
|
||||
|
||||
my $canShow = $self->session->setting->get("showDebug")
|
||||
&& $self->canShowBasedOnIP('debugIp');
|
||||
$self->{_canShowDebug} = $canShow;
|
||||
|
|
@ -325,6 +328,22 @@ sub new {
|
|||
bless {_queryCount=>0, _logger=>$logger, _session=>$session}, $class;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
=head2 preventDebugOutput ( )
|
||||
|
||||
Prevent this session from sending debugging output even if we're supposed to.
|
||||
|
||||
Some times we need to use 'text/html' to send non-html content (these may be
|
||||
browser limitations, but we need to work with them).
|
||||
|
||||
=cut
|
||||
|
||||
sub preventDebugOutput {
|
||||
my ( $self ) = @_;
|
||||
$self->{_preventDebugOutput} = 1;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 query ( sql )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue