Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b81ceec0

Von Sven Schöling vor mehr als 9 Jahren hinzugefügt

  • ID b81ceec0ae27fd58adbb724ad99a6ee48a74af35
  • Vorgänger 227bdad2
  • Nachfolger 1904d8c6

make_record: Zusätzliche Formvariablen speichern.

Unterschiede anzeigen:

SL/Controller/PriceSource.pm
93 93
          : $class->new;
94 94

  
95 95
  for my $method (apply { s/_$row$// } grep { /_$row$/ } keys %$::form) {
96
    next unless $obj->meta->column($method);
97
    if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
98
      $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
99
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
100
      $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
101
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
102
      $obj->$method(!!$::form->{$method});
96
    if ($obj->meta->column($method)) {
97
      if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
98
        $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
99
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
100
        $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
101
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
102
        $obj->$method(!!$::form->{$method});
103
      } else {
104
        $obj->$method($::form->{"$method\_$row"});
105
      }
103 106
    } else {
104
      $obj->$method($::form->{"$method\_$row"});
107
      $obj->{__additional_form_attributes}{$method} = $::form->{"$method\_$row"};
105 108
    }
106 109
  }
107 110

  
bin/mozilla/io.pl
2044 2044
          : $class->new;
2045 2045

  
2046 2046
  for my $method (apply { s/_$row$// } grep { /_$row$/ } keys %$::form) {
2047
    next unless $obj->meta->column($method);
2048
    if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
2049
      $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
2050
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
2051
      $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
2052
    } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
2053
      $obj->$method(!!$::form->{$method});
2047
    if ($obj->meta->column($method)) {
2048
      if ($obj->meta->column($method)->isa('Rose::DB::Object::Metadata::Column::Date')) {
2049
        $obj->${\"$method\_as_date"}($::form->{"$method\_$row"});
2050
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::(?:Numeric|Float|DoublePrecsion)$/) {
2051
        $obj->${\"$method\_as_number"}($::form->{"$method\_$row"});
2052
      } elsif ((ref $obj->meta->column($method)) =~ /^Rose::DB::Object::Metadata::Column::Boolean$/) {
2053
        $obj->$method(!!$::form->{$method});
2054
      } else {
2055
        $obj->$method($::form->{"$method\_$row"});
2056
      }
2054 2057
    } else {
2055
      $obj->$method($::form->{"$method\_$row"});
2058
      $obj->{__additional_form_attributes}{$method} = $::form->{"$method\_$row"};
2056 2059
    }
2057 2060
  }
2058 2061

  

Auch abrufbar als: Unified diff