[interchange] Correct logic of DisplayErrors
David Christensen <[email protected]> Fri, 08 Sep 2017 22:38:47 +0000
| Newsgroups | gmane.comp.web.interchange.cvs |
|---|---|
| Message-ID | <[email protected]> |
commit 096f9b97470c0106594573dda4114e5adf25e81c Author: David Christensen <[email protected]> Date: Fri Sep 8 17:30:23 2017 -0500 Correct logic of DisplayErrors Most directives (and other places with this specific directive) use 'or' logic to allow you to define directives in either `interchange.cfg` or `catalog.cfg` to enable a default-off behavior at either the Interchange server level or at the level of a specific catalog. As originally coded, the DisplayErrors directive would have only worked when *both* `interchange.cfg` and `catalog.cfg` had this enabled. Change this so it shows up when either the current catalog or the global config has this set. Since the old default was 'no', someone intended this information to be output, so this is the correct behavior, considering that I only fixed the output of this message in the previous commit. lib/Vend/Dispatch.pm | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) --- diff --git a/lib/Vend/Dispatch.pm b/lib/Vend/Dispatch.pm index eeb463e..cea6640 100644 --- a/lib/Vend/Dispatch.pm +++ b/lib/Vend/Dispatch.pm @@ -690,7 +690,7 @@ Sorry, there was an error in processing this form action. Please report the error or try again later. EOF $template .= "\n\nError: %s\n" - if $Global::DisplayErrors && $Vend::Cfg->{DisplayErrors} + if $Global::DisplayErrors || $Vend::Cfg->{DisplayErrors} ; $template = get_locale_message(500, $template, $err); logError($err); @@ -1680,7 +1680,7 @@ EOF and not ($Vend::admin and ! $::Variable->{MV_TRACK_ADMIN}); # END TRACK - if($Vend::Cfg->{DisplayErrors} and $Global::DisplayErrors) { + if($Vend::Cfg->{DisplayErrors} or $Global::DisplayErrors) { $SIG{"__DIE__"} = sub { my $msg = shift; put_session() if $Vend::HaveSession; @@ -1889,7 +1889,7 @@ Sorry, there was an error in processing this form action. Please report the error or try again later. EOF $template .= "\n\nError: %s\n" - if $Global::DisplayErrors && $Vend::Cfg->{DisplayErrors} + if $Global::DisplayErrors || $Vend::Cfg->{DisplayErrors} ; $template = get_locale_message(500, $template, $err); logError($err);