diff options
-rwxr-xr-x | LedgerSMB/Form.pm | 6 | ||||
-rwxr-xr-x | LedgerSMB/User.pm | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 59f23b6c..0785caf5 100755 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -184,7 +184,7 @@ sub error { my ($self, $msg) = @_; - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { $self->{msg} = $msg; $self->{format} = "html"; @@ -214,7 +214,7 @@ sub error { sub info { my ($self, $msg) = @_; - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { $msg =~ s/\n/<br>/g; delete $self->{pre}; @@ -275,7 +275,7 @@ sub header { my ($stylesheet, $favicon, $charset); - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { if ($self->{stylesheet} && (-f "css/$self->{stylesheet}")) { $stylesheet = qq|<link rel="stylesheet" href="css/$self->{stylesheet}" type="text/css" title="LedgerSMB stylesheet" />\n|; diff --git a/LedgerSMB/User.pm b/LedgerSMB/User.pm index 3aaf3391..bd40b3b7 100755 --- a/LedgerSMB/User.pm +++ b/LedgerSMB/User.pm @@ -900,7 +900,7 @@ sub config_vars { sub error { my ($self, $msg) = @_; - if ($ENV{HTTP_USER_AGENT}) { + if ($ENV{GATEWAY_INTERFACE}) { print qq|Content-Type: text/html\n\n|. qq|<body bgcolor=ffffff>\n\n|. qq|<h2><font color=red>Error!</font></h2>\n|. |