Requested docs/scripts added for 11777
This commit is contained in:
parent
0a3329d7be
commit
2adb08c79c
8 changed files with 407 additions and 974 deletions
|
|
@ -33,6 +33,7 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
replaceUsageOfOldTemplates($session);
|
||||
replacePayPalDriver($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -46,6 +47,24 @@ finish($session); # this line required
|
|||
# print "DONE!\n" unless $quiet;
|
||||
#}
|
||||
|
||||
sub replacePayPalDriver {
|
||||
my $session = shift;
|
||||
my $config = $session->config;
|
||||
my $prop = 'paymentDrivers';
|
||||
my $old = 'WebGUI::Shop::PayDriver::PayPal::PayPalStd';
|
||||
my $drivers = $config->get($prop);
|
||||
foreach my $driver (@$drivers) {
|
||||
# We'll do nothing if the old paypal driver isn't used
|
||||
next unless $driver eq $old;
|
||||
|
||||
print "\tUpdating config to use new PayPal driver..." unless $quiet;
|
||||
$config->deleteFromArray($prop, $old);
|
||||
$config->addToArray($prop, 'WebGUI::Shop::PayDriver::PayPal');
|
||||
print "DONE!\n" unless $quiet;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub replaceUsageOfOldTemplates {
|
||||
my $session = shift;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue