Document why a check exists in canShowDebug.
This commit is contained in:
parent
6b66b25110
commit
47889613b9
1 changed files with 3 additions and 0 deletions
|
|
@ -110,7 +110,10 @@ Returns true if the user meets the condition to see debugging information and de
|
|||
|
||||
sub canShowDebug {
|
||||
my $self = shift;
|
||||
|
||||
##This check prevents in infinite loop during startup.
|
||||
return 0 unless ($self->session->hasSettings);
|
||||
|
||||
return 0 unless ($self->session->setting->get("showDebug"));
|
||||
return 0 unless (substr($self->session->http->getMimeType(),0,9) eq "text/html");
|
||||
return $self->canShowBasedOnIP('debugIp');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue