Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2bb1c961

Von Moritz Bunkus vor etwa 10 Jahren hinzugefügt

  • ID 2bb1c9616f0fe4c8c1d39574a99eff02a7ece42e
  • Vorgänger e2a023ca
  • Nachfolger b996f6ca

SL::DB::CustomVariable: value_as_text() für Typ 'date' gefixt

Bisher wurde schlicht das falsche Feld zurückgegeben: text_value. Nun
wird das formatierte Datum aus timestamp_value zurückgegeben.

Unterschiede anzeigen:

SL/DB/CustomVariable.pm
if ($type eq 'bool') {
return $self->bool_value ? $::locale->text('Yes') : $::locale->text('No');
} elsif ($type eq 'timestamp') {
} elsif ($type =~ m{^(?:timestamp|date)}) {
return $::locale->reformat_date( { dateformat => 'yy-mm-dd' }, $self->timestamp_value->ymd, $::myconfig{dateformat});
} elsif ($type eq 'number') {
return $::form->format_amount(\%::myconfig, $self->number_value, $cfg->processed_options->{PRECISION});
......
return $part ? $part->description : '';
}
goto &text_value; # text, textfield, date and select
goto &text_value; # text, textfield and select
}
sub is_valid {

Auch abrufbar als: Unified diff