diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 05330dd94..8bfb7f874 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -8,6 +8,7 @@ - fixed #11965: FriendManager pagination and getUsersNotIn - fixed #11964: files show in trash and in old revisions - fixed #11954: Can't clear packed head tags + - fixed #11957: finBrokenAsset --fix does not fix per se 7.10.4 - Added WebGUI::Fork api diff --git a/sbin/findBrokenAssets.pl b/sbin/findBrokenAssets.pl index 9ecaaab32..048f00c2e 100644 --- a/sbin/findBrokenAssets.pl +++ b/sbin/findBrokenAssets.pl @@ -103,12 +103,15 @@ while ( my %row = $sth->hash ) { } print "Fixed.\n"; + my $asset = WebGUI::Asset->newByDynamicClass( $session, $row{assetId} ); # Make sure we have a valid parent - unless ( WebGUI::Asset->newByDynamicClass( $session, $row{parentId} ) ) { - my $asset = WebGUI::Asset->newByDynamicClass( $session, $row{assetId} ); + unless ( $asset && WebGUI::Asset->newByDynamicClass( $session, $row{parentId} ) ) { $asset->setParent( WebGUI::Asset->getImportNode( $session ) ); print "\tNOTE: Invalid parent. Asset moved to Import Node\n"; } + if (!$asset) { + print "\tWARNING. Asset is still broken.\n"; + } } ## end if ($fix) elsif ($delete) {