Duplicate the old RSS asset fix right before the upgrade sub that causes problems,
to catch users who have upgraded past the original stopping point.
This commit is contained in:
parent
824e2c756f
commit
d6e242f8b2
1 changed files with 18 additions and 0 deletions
|
|
@ -30,6 +30,7 @@ my $quiet; # this line required
|
|||
|
||||
my $session = start(); # this line required
|
||||
|
||||
removeDanglingOldRssAssets( $session );
|
||||
addOgoneToConfig( $session );
|
||||
addUseEmailAsUsernameToSettings( $session );
|
||||
alterVATNumberTable( $session );
|
||||
|
|
@ -47,6 +48,23 @@ addUserControlWorkflows($session);
|
|||
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub removeDanglingOldRssAssets {
|
||||
my $session = shift;
|
||||
print "\tChecking for uses of RSSCapable...\n" unless $quiet;
|
||||
my @rssCapableClasses = $session->db->buildArray('SELECT className FROM RSSCapable INNER JOIN asset ON RSSCapable.assetId=asset.assetId GROUP BY className');
|
||||
if (@rssCapableClasses) {
|
||||
warn "\t\tThis site is using the assets\n\t\t\t" . join(', ', @rssCapableClasses) . "\n\t\twhich use the RSSCapable class! Support RSSCapable has been dropped and it will no longer be maintained.\n";
|
||||
}
|
||||
else {
|
||||
print "\t\tNot used, removing leftover assets, if any.\n" unless $quiet;
|
||||
$session->db->write(q|DELETE FROM assetData WHERE assetId IN (SELECT assetId FROM ASSET WHERE className="WebGUI::Asset::RssFromParent")|);
|
||||
$session->db->write(q|DELETE FROM asset WHERE className = "WebGUI::Asset::RssFromParent"|);
|
||||
}
|
||||
print "\tDone.\n" unless $quiet;
|
||||
}
|
||||
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub addMatrixMaxGroup {
|
||||
my $session = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue