Forward port PayDriver button and labeling fix.

Forward port testEnvironment fix for not having prerequisite perl modules.
This commit is contained in:
Colin Kuskie 2008-12-10 02:28:39 +00:00
parent 08bf6b5147
commit 6336e569ff
5 changed files with 12 additions and 5 deletions

View file

@ -10,6 +10,9 @@
- fixed #9252: Thingy defaultValue length causes input to be truncated (SDH Consulting Group)
- fixed #8937: Feeds in Calendar strip information
- fixed #9063: Thingy - Time Field editing errors
- fixed #9237: Payment Gateways all display "cash"
- fixed #8816: PayDriver "Label" of the instance of the driver should be used instead of the generic name
- fixed #4220: testEnvironment.pl unable to find WebGUI modules...
7.6.5
- security: A problem was discovered and fixed in which users could email executable attachments to a collaboration system and then when viewed online, could execute them.

View file

@ -337,7 +337,7 @@ sub www_manage {
.WebGUI::Form::formFooter($session)
# Append payment gateway label
.' '. $paymentGateway->label()
.' '. $paymentGateway->get('label')
.'</div>';
}

View file

@ -62,11 +62,10 @@ this plugin.
sub getButton {
my $self = shift;
my $session = $self->session;
my $i18n = WebGUI::International->new($session, 'PayDriver_Cash');
my $payForm = WebGUI::Form::formHeader($session)
. $self->getDoFormTags('getCredentials')
. WebGUI::Form::submit($session, {value => $i18n->get('cash') })
. WebGUI::Form::submit($session, {value => $self->get('label') })
. WebGUI::Form::formFooter($session);
return $payForm;

View file

@ -430,11 +430,10 @@ sub doXmlRequest {
sub getButton {
my $self = shift;
my $session = $self->session;
my $i18n = WebGUI::International->new($session, 'PayDriver');
my $payForm = WebGUI::Form::formHeader($session)
. $self->getDoFormTags('getCredentials')
. WebGUI::Form::submit($session, {value => $i18n->get('credit card') })
. WebGUI::Form::submit($session, {value => $self->get('label') })
. WebGUI::Form::formFooter($session);
return $payForm;

View file

@ -54,6 +54,8 @@ if ($] >= 5.008) {
failAndExit("Please upgrade to 5.8 or later! Cannot continue without Perl 5.8 or higher.");
}
##Doing this as a global is not nice, but it works
my $missingModule = 0;
checkModule("LWP", 5.80 );
checkModule("HTTP::Request", 1.40 );
@ -117,6 +119,7 @@ checkModule("File::Path", "2.04" );
checkModule("Module::Find", "0.06" );
checkModule("Class::C3", "0.19" );
failAndExit("Required modules are missing, running no more checks.") if $missingModule;
###################################
# Checking WebGUI
@ -267,6 +270,7 @@ sub checkModule {
# skip
elsif ($simpleReport) {
printResult("Not Installed");
$missingModule = 1;
}
# if we're root lets try and install it
@ -282,12 +286,14 @@ sub checkModule {
# install aborted by user
else {
printResult("Install aborted by user input.");
$missingModule = 1;
}
}
# can't install, not root
else {
printResult("Not installed, but you're not root, so you need to ask your administrator to install it.");
$missingModule = 1;
}
}
}