Merge commit 'v7.10.20' into WebGUI8

This commit is contained in:
Colin Kuskie 2011-10-26 15:02:51 -07:00
commit fdb979ca8a
72 changed files with 830 additions and 224 deletions

View file

@ -1037,18 +1037,22 @@ sub getFieldValue {
my $dateFormat = shift || "%z";
my $dateTimeFormat = shift;
my $processedValue = $value;
my $dbh = $self->session->db->dbh;
my $session = $self->session;
my $dbh = $session->db->dbh;
if (lc $field->{fieldType} eq "date"){
$processedValue = $self->session->datetime->epochToHuman($value,$dateFormat);
my $fieldType = lc $field->{fieldType};
if ($fieldType eq "date"){
my $dt = WebGUI::DateTime->new($session, $value);
$processedValue = $dt->webguiDate($dateFormat);
}
elsif (lc $field->{fieldType} eq "datetime"){
$processedValue = $self->session->datetime->epochToHuman($value,$dateTimeFormat);
elsif ($fieldType eq "datetime"){
my $dt = WebGUI::DateTime->new($session, $value);
$processedValue = $dt->webguiDate($dateTimeFormat);
}
# TODO: The otherThing field type is probably also handled by getFormPlugin, so the elsif below can probably be
# safely removed. However, this requires more testing than I can provide right now, so for now this stays the
# way it was.
elsif ($field->{fieldType} =~ m/^otherThing/x) {
elsif ($field->{fieldType} =~ m/^otherthing/x) {
my $otherThingId = $field->{fieldType};
$otherThingId =~ s/^otherThing_//x;
my $tableName = 'Thingy_'.$otherThingId;