Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6d1df9ca

Von Moritz Bunkus vor mehr als 17 Jahren hinzugefügt

  • ID 6d1df9ca24bbb8c03e10812ce4cf1b889d947470
  • Vorgänger b62c51a4
  • Nachfolger 299606e3

Beim Versenden von Emails wird der Text etc wieder in intnotes gespeichert. Fix für Bug 713.

Unterschiede anzeigen:

SL/Common.pm
384 384
  $main::lxdebug->leave_sub();
385 385
}
386 386

  
387
sub save_email_status {
388
  $main::lxdebug->enter_sub();
389

  
390
  my ($self, $myconfig, $form) = @_;
391

  
392
  my ($table, $query, $dbh);
393

  
394
  if ($form->{script} eq 'oe.pl') {
395
    $table = 'oe';
396

  
397
  } elsif ($form->{script} eq 'is.pl') {
398
    $table = 'ar';
399

  
400
  } elsif ($form->{script} eq 'ir.pl') {
401
    $table = 'ap';
402

  
403
  }
404

  
405
  return $main::lxdebug->leave_sub() if (!$form->{id} || !$table || !$form->{formname});
406

  
407
  $dbh = $form->get_standard_dbh($myconfig);
408

  
409
  my ($intnotes) = selectrow_query($form, $dbh, qq|SELECT intnotes FROM $table WHERE id = ?|, $form->{id});
410

  
411
  $intnotes =~ s|\r||g;
412
  $intnotes =~ s|\n$||;
413

  
414
  $intnotes .= "\n\n" if ($intnotes);
415

  
416
  my $cc  = $main::locale->text('Cc') . ": $form->{cc}\n"   if $form->{cc};
417
  my $bcc = $main::locale->text('Bcc') . ": $form->{bcc}\n" if $form->{bcc};
418
  my $now = scalar localtime;
419

  
420
  $intnotes .= $main::locale->text('[email]') . "\n"
421
    . $main::locale->text('Date') . ": $now\n"
422
    . $main::locale->text('To (email)') . ": $form->{email}\n"
423
    . "${cc}${bcc}"
424
    . $main::locale->text('Subject') . ": $form->{subject}\n\n"
425
    . $main::locale->text('Message') . ": $form->{message}";
426

  
427
  $intnotes =~ s|\r||g;
428

  
429
  do_query($form, $dbh, qq|UPDATE $table SET intnotes = ? WHERE id = ?|, $intnotes, $form->{id});
430

  
431
  $form->save_status($dbh);
432

  
433
  $dbh->commit();
434

  
435
  $main::lxdebug->leave_sub();
436
}
437

  
387 438
1;

Auch abrufbar als: Unified diff