Prune duplicate code for post package work.
This commit is contained in:
parent
fe31cc96de
commit
df31846aea
2 changed files with 0 additions and 30 deletions
|
|
@ -453,21 +453,6 @@ sub addPackage {
|
||||||
die "Error during package import on $file: $@\nStopping upgrade\n.";
|
die "Error during package import on $file: $@\nStopping upgrade\n.";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn off the package flag, and set the default flag for templates added
|
|
||||||
my $assetIds = $package->getLineage( ['self','descendants'] );
|
|
||||||
for my $assetId ( @{ $assetIds } ) {
|
|
||||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
|
||||||
if ( !$asset ) {
|
|
||||||
print "Couldn't instantiate asset with ID '$assetId'. Please check package '$file' for corruption.\n";
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my $properties = { isPackage => 0 };
|
|
||||||
if ($asset->isa('WebGUI::Asset::Template')) {
|
|
||||||
$properties->{isDefault} = 1;
|
|
||||||
}
|
|
||||||
$asset->update( $properties );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -187,21 +187,6 @@ sub addPackage {
|
||||||
die "Error during package import on $file: $@\nStopping upgrade\n.";
|
die "Error during package import on $file: $@\nStopping upgrade\n.";
|
||||||
}
|
}
|
||||||
|
|
||||||
# Turn off the package flag, and set the default flag for templates added
|
|
||||||
my $assetIds = $package->getLineage( ['self','descendants'] );
|
|
||||||
for my $assetId ( @{ $assetIds } ) {
|
|
||||||
my $asset = WebGUI::Asset->newByDynamicClass( $session, $assetId );
|
|
||||||
if ( !$asset ) {
|
|
||||||
print "Couldn't instantiate asset with ID '$assetId'. Please check package '$file' for corruption.\n";
|
|
||||||
next;
|
|
||||||
}
|
|
||||||
my $properties = { isPackage => 0 };
|
|
||||||
if ($asset->isa('WebGUI::Asset::Template')) {
|
|
||||||
$properties->{isDefault} = 1;
|
|
||||||
}
|
|
||||||
$asset->update( $properties );
|
|
||||||
}
|
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue