[Rt-commit] r7028 - rt/branches/3.6-RELEASE/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Sun Feb 18 20:57:48 EST 2007


Author: ruz
Date: Sun Feb 18 20:57:48 2007
New Revision: 7028

Modified:
   rt/branches/3.6-RELEASE/lib/RT/Record.pm

Log:
* fix errors propagation. Thanks to Philip Kime.

Modified: rt/branches/3.6-RELEASE/lib/RT/Record.pm
==============================================================================
--- rt/branches/3.6-RELEASE/lib/RT/Record.pm	(original)
+++ rt/branches/3.6-RELEASE/lib/RT/Record.pm	Sun Feb 18 20:57:48 2007
@@ -1657,7 +1657,7 @@
         );
 
         unless ($new_value_id) {
-            return ( 0, $self->loc( "Could not add new custom field value. [_1] ",, $value_msg));
+            return ( 0, $self->loc( "Could not add new custom field value: [_1]", $value_msg) );
         }
 
         my $new_value = RT::ObjectCustomFieldValue->new( $self->CurrentUser );
@@ -1696,7 +1696,7 @@
 
     # otherwise, just add a new value and record "new value added"
     else {
-        my ($new_value_id) = $cf->AddValueForObject(
+        my ($new_value_id, $value_msg) = $cf->AddValueForObject(
             Object       => $self,
             Content      => $args{'Value'},
             LargeContent => $args{'LargeContent'},
@@ -1704,7 +1704,7 @@
         );
 
         unless ($new_value_id) {
-            return ( 0, $self->loc("Could not add new custom field value. ") );
+            return ( 0, $self->loc( "Could not add new custom field value: [_1]", $value_msg) );
         }
         if ( $args{'RecordTransaction'} ) {
             my ( $TransactionId, $Msg, $TransactionObj ) =


More information about the Rt-commit mailing list