diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 739f80b1e..21b07f0e9 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -6,6 +6,8 @@ - fixed: Syndicated Content doesn't always decode text properly - fixed: Syndicated Content caches improperly - added File::Path 2.04 as a prerequisite + - fixed: Asset Manager shows data error when no child assets to display + - changed: show 25 items per page in asset manager 7.5.15 - fixed: Colorpicker window would not open (Martin Kamerbeek / Oqapi) diff --git a/lib/WebGUI/Content/AssetManager.pm b/lib/WebGUI/Content/AssetManager.pm index dcecad106..f14d25fee 100644 --- a/lib/WebGUI/Content/AssetManager.pm +++ b/lib/WebGUI/Content/AssetManager.pm @@ -2,7 +2,7 @@ package WebGUI::Content::AssetManager; use strict; -use JSON qw( from_json to_json ); +use JSON qw( decode_json encode_json ); use URI; use WebGUI::Form; use WebGUI::Paginator; @@ -221,7 +221,7 @@ sub getMoreMenu { }; } - return to_json \@more_fields; + return encode_json \@more_fields; } #---------------------------------------------------------------------------- @@ -271,7 +271,7 @@ formatted in a WebGUI.AssetManager data table. sub www_ajaxGetManagerPage { my $session = shift; my $i18n = WebGUI::International->new( $session, "Asset" ); - my $assetInfo = {}; + my $assetInfo = { assets => [] }; my $p = getManagerPaginator( $session ); for my $assetId ( @{ $p->getPageData } ) { @@ -307,7 +307,7 @@ sub www_ajaxGetManagerPage { $assetInfo->{ dir } = lc $session->form->get( 'orderByDirection' ); $session->http->setMimeType( 'application/json' ); - return to_json( $assetInfo ); + return encode_json( $assetInfo ); } #---------------------------------------------------------------------------- @@ -406,7 +406,7 @@ ENDHTML } # And ourself - $output .= sprintf q{