diff --git a/docs/upgrades/upgrade_7.8.3-7.8.4.pl b/docs/upgrades/upgrade_7.8.3-7.8.4.pl index d8d18459f..95a121a42 100644 --- a/docs/upgrades/upgrade_7.8.3-7.8.4.pl +++ b/docs/upgrades/upgrade_7.8.3-7.8.4.pl @@ -31,6 +31,7 @@ my $quiet; # this line required my $session = start(); # this line required # upgrade functions go here +dropSkipNotification($session); finish($session); # this line required @@ -45,6 +46,14 @@ finish($session); # this line required #} +#------------------------------------------------------------------------ +sub dropSkipNotification { + my $session = shift; + print "\tRemoving duplicate skipNotification field from the Subscribable aspect... " unless $quiet; + $session->db->write('alter table assetAspect_Subscribable drop column skipNotification'); + print "Done.\n" unless $quiet; +} + # -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- #---------------------------------------------------------------------------- diff --git a/lib/WebGUI/AssetAspect/Subscribable.pm b/lib/WebGUI/AssetAspect/Subscribable.pm index bada309bd..7ed94f1ef 100644 --- a/lib/WebGUI/AssetAspect/Subscribable.pm +++ b/lib/WebGUI/AssetAspect/Subscribable.pm @@ -44,11 +44,6 @@ sub definition { label => $i18n->get("Email Template"), hoverHelp => $i18n->get("Email Template help"), }, - skipNotification => { - autoGenerate => 0, - noFormPost => 1, - fieldType => 'yesNo', - }, ); push @{ $definition }, { @@ -441,27 +436,6 @@ sub purge { #---------------------------------------------------------------------------- -=head2 setSkipNotification ( ) - -Set a flag so that this asset does not send out notifications for this -revision. - -=cut - -sub setSkipNotification { - my $self = shift; - my $value = shift; - $value = defined $value ? $value : 1; - - $self->update( { - skipNotification => $value, - } ); - - return; -} - -#---------------------------------------------------------------------------- - =head2 shouldSkipNotification ( ) Returns true if the asset should skip notifications. diff --git a/t/Asset/WikiPage.t b/t/Asset/WikiPage.t index f2bbe7d80..85b923bda 100644 --- a/t/Asset/WikiPage.t +++ b/t/Asset/WikiPage.t @@ -29,7 +29,11 @@ addToCleanup($versionTag); my $wiki = $node->addChild({className=>'WebGUI::Asset::Wobject::WikiMaster'}); $versionTag->commit; -my $wikipage = $wiki->addChild({className=>'WebGUI::Asset::WikiPage'}, undef, undef, {skipAutoCommitWorkflows => 1}); +my $wikipage = $wiki->addChild( + {className=>'WebGUI::Asset::WikiPage'}, + undef, undef, + {skipAutoCommitWorkflows => 1, skipNotification => 1} +); # Wikis create and autocommit a version tag when a child is added. Lets get the name so we can roll it back. my $secondVersionTag = WebGUI::VersionTag->new($session,$wikipage->get("tagId"));