updated webgui to run with Config::JSON 2.04
This commit is contained in:
parent
fb434a8b3a
commit
34fd8c9245
20 changed files with 56 additions and 51 deletions
|
|
@ -25,7 +25,7 @@ use WebGUI::DateTime;
|
|||
use DateTime::TimeZone;
|
||||
|
||||
use LWP::UserAgent;
|
||||
use JSON qw(objToJson jsonToObj);
|
||||
use JSON qw(to_json from_json);
|
||||
|
||||
=head1 NAME
|
||||
|
||||
|
|
@ -92,8 +92,8 @@ sub execute {
|
|||
my $eventList = [];
|
||||
my $feedList;
|
||||
if ($instance->getScratch('events')) {
|
||||
$eventList = jsonToObj($instance->getScratch('events'));
|
||||
$feedList = jsonToObj($instance->getScratch('feeds'));
|
||||
$eventList = from_json($instance->getScratch('events'));
|
||||
$feedList = from_json($instance->getScratch('feeds'));
|
||||
}
|
||||
else {
|
||||
my $ua = LWP::UserAgent->new(agent => "WebGUI");
|
||||
|
|
@ -356,8 +356,8 @@ sub execute {
|
|||
}
|
||||
while (@$eventList) {
|
||||
if ($startTime + 55 < time()) {
|
||||
$instance->setScratch('events', objToJson($eventList));
|
||||
$instance->setScratch('feeds', objToJson($feedList));
|
||||
$instance->setScratch('events', to_json($eventList));
|
||||
$instance->setScratch('feeds', to_json($feedList));
|
||||
return $self->WAITING;
|
||||
}
|
||||
my $eventData = shift @$eventList;
|
||||
|
|
|
|||
|
|
@ -105,7 +105,7 @@ sub execute {
|
|||
|
||||
# See if we're done
|
||||
if (scalar(@arrayCopy) > 0) {
|
||||
$instance->setScratch("syndicatedUrls", objToJson(@arrayCopy));
|
||||
$instance->setScratch("syndicatedUrls", JSON::to_json(@arrayCopy));
|
||||
return $self->WAITING;
|
||||
}
|
||||
|
||||
|
|
@ -139,11 +139,11 @@ sub getSyndicatedUrls {
|
|||
asset.state='published'"
|
||||
);
|
||||
|
||||
$instance->setScratch("syndicatedUrls", objToJson($urls));
|
||||
$instance->setScratch("syndicatedUrls", JSON::to_json($urls));
|
||||
return $urls;
|
||||
}
|
||||
|
||||
return jsonToObj($syndicatedUrls);
|
||||
return JSON::from_json($syndicatedUrls);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue