[Rt-commit] rt branch, 4.2/record-attachments-insert-failure, repushed

? sunnavy sunnavy at bestpractical.com
Mon Feb 9 10:32:39 EST 2015


The branch 4.2/record-attachments-insert-failure was deleted and repushed:
       was f357949c5a0e03089a63945d68febf9e2b98cfae
       now b877ec6fa9d7ff82f9e7abf2e821088253c9941c

1:  f357949 ! 1:  b877ec6 record attachment insert error to txn
    @@ -11,7 +11,11 @@
      
              unless ($id) {
                  $RT::Logger->crit("Attachment insert failed - ". $RT::Handle->dbh->errstr);
    -+            $self->TransactionObj->Object->_NewTransaction( Type => 'AttachmentError', ActivateScrips => 0, Data => $Filename, NewValue => substr($RT::Handle->dbh->errstr,0,255) );
    ++            my $txn = RT::Transaction->new($self->CurrentUser);
    ++            $txn->Load($args{'TransactionId'});
    ++            if ( $txn->id ) {
    ++                $txn->Object->_NewTransaction( Type => 'AttachmentError', ActivateScrips => 0, Data => $Filename );
    ++            }
                  return ($id);
              }
      
    @@ -19,7 +23,11 @@
              }
              else {
                  $RT::Logger->crit("Attachment insert failed: ". $RT::Handle->dbh->errstr);
    -+            $self->TransactionObj->Object->_NewTransaction( Type => 'AttachmentError', ActivateScrips => 0, Data => $Filename, NewValue => substr($RT::Handle->dbh->errstr,0,255) );
    ++            my $txn = RT::Transaction->new($self->CurrentUser);
    ++            $txn->Load($args{'TransactionId'});
    ++            if ( $txn->id ) {
    ++                $txn->Object->_NewTransaction( Type => 'AttachmentError', ActivateScrips => 0, Data => $Filename );
    ++            }
              }
              return $id;
          }
    @@ -46,10 +54,10 @@
     +    AttachmentError => sub {
     +        my $self = shift;
     +        if ( defined $self->Data ) {
    -+            return ( "File '[_1]' insert failed because [_2].", $self->Data, $self->NewValue ); #loc()
    ++            return ( "File '[_1]' insert failed. See error log for details.", $self->Data ); #loc()
     +        }
     +        else {
    -+            return ( "Content insert failed because [_1].", $self->NewValue ); #loc()
    ++            return ( "Content insert failed. See error log for details." ); #loc()
     +        }
     +    },
          "Forward Transaction" => sub {



More information about the rt-commit mailing list