use UTF8 JSON encoding and decoding universally
fixed: Import/Export of packages with international text is broken
This commit is contained in:
parent
35bfeac0ef
commit
9ed284beec
16 changed files with 42 additions and 40 deletions
|
|
@ -122,7 +122,7 @@ sub www_spectreGetSiteData {
|
|||
}
|
||||
$siteData{cron} = \@schedules;
|
||||
}
|
||||
return JSON::to_json(\%siteData);
|
||||
return JSON::encode_json(\%siteData);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
|
@ -169,8 +169,8 @@ sub www_spectreStatus {
|
|||
}
|
||||
|
||||
my %data = (
|
||||
workflow => from_json($workflowResult),
|
||||
cron => from_json($cronResult),
|
||||
workflow => decode_json($workflowResult),
|
||||
cron => decode_json($cronResult),
|
||||
);
|
||||
|
||||
my $workflowCount = @{ $data{workflow}{Suspended} } + @{ $data{workflow}{Waiting} } + @{ $data{workflow}{Running} };
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use WebGUI::Workflow::Activity;
|
|||
use WebGUI::Workflow::Instance;
|
||||
use WebGUI::Utility;
|
||||
use POE::Component::IKC::ClientLite;
|
||||
use JSON qw/ from_json /;
|
||||
use JSON qw/ decode_json /;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ sub www_editWorkflowPriority {
|
|||
return $ac->render($output, $i18n->get('show running workflows'));
|
||||
}
|
||||
|
||||
my $responseHref = from_json($resultJson);
|
||||
my $responseHref = decode_json($resultJson);
|
||||
|
||||
my $message = $i18n->get($responseHref->{message}) || $i18n->get('edit priority unknown error');
|
||||
return $ac->render($message, $i18n->get('show running workflows'));
|
||||
|
|
@ -577,7 +577,7 @@ ENDCODE
|
|||
}
|
||||
|
||||
if (defined $workflowResult) {
|
||||
my $workflowsHref = from_json($workflowResult);
|
||||
my $workflowsHref = decode_json($workflowResult);
|
||||
|
||||
my $workflowTitleFor = $session->db->buildHashRef(<<"");
|
||||
SELECT wi.instanceId, w.title
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue