removing WSClient
This commit is contained in:
parent
585e608506
commit
0957247dbc
6 changed files with 34 additions and 567 deletions
|
|
@ -31,13 +31,36 @@ my $session = start(); # this line required
|
|||
fixAccountMisspellings( $session );
|
||||
removeTemplateHeadBlock( $session );
|
||||
updateMatrixListingScores( $session );
|
||||
removeSqlForm( $session );
|
||||
|
||||
# upgrade functions go here
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
sub removeSqlForm {
|
||||
my $session = shift;
|
||||
print "\tOptionally removing Web Services Client...\n" unless $quiet;
|
||||
my $db = $session->db;
|
||||
unless ($db->quickScalar("select count(*) from asset where className='WebGUI::Asset::Wobject::WSClient'")) {
|
||||
print "\t\tNot using it, so we're uninstalling it.\n" unless $quiet;
|
||||
$session->config->delete("assets/WebGUI::Asset::Wobject::WSClient");
|
||||
my @ids = $db->buildArray("select distinct assetId from template where namespace = 'WSClient'");
|
||||
push @ids, qw(5YAbuwiVFUx-z8hcOAnsdQ);
|
||||
foreach my $id (@ids) {
|
||||
my $asset = WebGUI::Asset->newByDynamicClass($session, $id);
|
||||
if (defined $asset) {
|
||||
$asset->purge;
|
||||
}
|
||||
}
|
||||
$db->write("drop table WSClient");
|
||||
}
|
||||
else {
|
||||
print "\t\tThis site uses Web Services Client, so we won't uninstall it.\n" unless $quiet;
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# Describe what our function does
|
||||
|
||||
sub updateMatrixListingScores {
|
||||
my $session = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue