Skip to content

Commit

Permalink
Prune duplicate code for post package work.
Browse files Browse the repository at this point in the history
  • Loading branch information
perlDreamer committed Mar 9, 2010
1 parent fe31cc9 commit df31846
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
15 changes: 0 additions & 15 deletions docs/upgrades/upgrade_7.7.33-7.8.13.pl
Expand Up @@ -453,21 +453,6 @@ sub addPackage {
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;
}

Expand Down
15 changes: 0 additions & 15 deletions docs/upgrades/upgrade_7.8.13-7.9.0.pl
Expand Up @@ -187,21 +187,6 @@ sub addPackage {
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;
}

Expand Down

0 comments on commit df31846

Please sign in to comment.