some updates to URL and content handlers to make them a bit more flexible

This commit is contained in:
JT Smith 2008-04-26 18:59:48 +00:00
parent c074fde72a
commit 17d6151832
9 changed files with 91 additions and 12 deletions

View file

@ -24,6 +24,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
addReferralHandler( $session );
addCalendarEventWorkflow( $session );
addPurgeOldInboxActivity( $session );
addingInStoreCredit($session);
@ -45,6 +46,23 @@ mergeProductsWithCommerce($session);
finish($session); # this line required
#----------------------------------------------------------------------------
sub addReferralHandler {
my $session = shift;
print "\tAdding a referral handler." unless $quiet;
my $config = $session->config;
my @handlers = ();
foreach my $element (@{$config->get("contentHandlers")}) {
if ($element eq "WebGUI::Content::Operation") {
push @handlers, "WebGUI::Content::Referral";
}
push @handlers, $element;
}
$config->set("contentHandlers", \@handlers);
print "DONE!\n" unless $quiet;
}
#----------------------------------------------------------------------------
# Add the database column to select the workflow to approve Calendar Events
sub addCalendarEventWorkflow {