]> wagnertech.de Git - mfinanz.git/blobdiff - SL/Form.pm
POD zu update_attributes ergänzt
[mfinanz.git] / SL / Form.pm
index 2d4bbd8c95f69f7d530f8ad533a75712f092e880..9045d78ca3a2c719b205f4d61d5a3b10e83a2b01 100644 (file)
@@ -66,6 +66,7 @@ use SL::IC;
 use SL::IS;
 use SL::Layout::Dispatcher;
 use SL::Locale;
+use SL::Locale::String;
 use SL::Mailer;
 use SL::Menu;
 use SL::MoreCommon qw(uri_encode uri_decode);
@@ -2607,16 +2608,17 @@ sub mtime_ischanged {
   my ($self, $table, $option) = @_;
 
   return                                       unless $self->{id};
-  croak ("wrong call, no valid table defined") unless $table =~ /(oe|ar|ap|delivery_orders|parts)/;
+  croak ("wrong call, no valid table defined") unless $table =~ /^(oe|ar|ap|delivery_orders|parts)$/;
 
   my $query       = "SELECT mtime, itime FROM " . $table . " WHERE id = ?";
   my $ref         = selectfirst_hashref_query($self, $self->get_standard_dbh, $query, $self->{id});
   $ref->{mtime} ||= $ref->{itime};
 
   if ($self->{lastmtime} && $self->{lastmtime} ne $ref->{mtime} ) {
-      my $etxt = ($option eq 'mail') ? "The document has been changed by another user. Please reopen it in another window and copy the changes to the new window" :
-                                       "The document has been changed by another user. No mail was sent. Please reopen it in another window and copy the changes to the new window";
-      $self->error($main::locale->text($etxt));
+      $self->error(($option eq 'mail') ?
+        t8("The document has been changed by another user. No mail was sent. Please reopen it in another window and copy the changes to the new window") :
+        t8("The document has been changed by another user. Please reopen it in another window and copy the changes to the new window")
+      );
     ::end_of_request();
   }
 }