Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 57657390

Von Bernd Bleßmann vor fast 2 Jahren hinzugefügt

  • ID 576573901b610c914069da2b7d85972065406c89
  • Vorgänger 587efe1a
  • Nachfolger 7e4a1765

Gültigkeitstoken in Transaction abfragen und löschen ("neue" Controller)

Unterschiede anzeigen:

SL/Controller/Reclamation.pm
1746 1746
sub save {
1747 1747
  my ($self) = @_;
1748 1748

  
1749
  my $validity_token;
1750
  if (!$self->reclamation->id) {
1751
    $validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token(
1752
      scope => SL::DB::ValidityToken::SCOPE_RECLAMATION_SAVE(),
1753
      token => $::form->{form_validity_token},
1754
    );
1755

  
1756
    die t8('The form is not valid anymore.') if !$validity_token;
1757
  }
1758

  
1759 1749
  my $errors = [];
1760 1750
  my $db     = $self->reclamation->db;
1761 1751

  
1762 1752
  $db->with_transaction(sub {
1753
    my $validity_token;
1754
    if (!$self->reclamation->id) {
1755
      $validity_token = SL::DB::Manager::ValidityToken->fetch_valid_token(
1756
        scope => SL::DB::ValidityToken::SCOPE_RECLAMATION_SAVE(),
1757
        token => $::form->{form_validity_token},
1758
      );
1759

  
1760
      die $::locale->text('The form is not valid anymore.') if !$validity_token;
1761
    }
1762

  
1763 1763
    # delete custom shipto if it is to be deleted or if it is empty
1764 1764
    if ($self->reclamation->custom_shipto
1765 1765
        && ($self->is_custom_shipto_to_delete

Auch abrufbar als: Unified diff