• R/O
  • HTTP
  • SSH
  • HTTPS

newslash: Commit

newslash


Commit MetaInfo

Revisão1ff4e7c6cf3947780665cff3632dd2d504fa71d3 (tree)
Hora2019-06-17 18:09:23
Autorhylom <hylom@user...>
Commiterhylom

Mensagem de Log

Plugin::ResponseFilter: fix to work correctly when 'result' attribue is scalar

Mudança Sumário

Diff

--- a/src/newslash_web/lib/Newslash/Plugin/ResponseFilter.pm
+++ b/src/newslash_web/lib/Newslash/Plugin/ResponseFilter.pm
@@ -23,7 +23,11 @@ sub register {
2323 return if (!defined $args->{json});
2424
2525 my $json = $args->{json};
26- my $result = $json->{result} || $json;
26+ my $result = $json;
27+ if (defined $json->{result} && ref($json->{result} eq "HASH")) {
28+ $result = $json->{result};
29+ }
30+
2731 if ($result->{item}) {
2832 if ($result->{item}->{content_type}) {
2933 apply_seclev_filter($c, $result->{item}->{content_type}, $result->{item});
Show on old repository browser