[Rt-commit] rt branch, 4.0/return-errors-on-template-create, created. rt-4.0.18-25-g485069c

Kevin Falcone falcone at bestpractical.com
Tue Oct 22 14:31:15 EDT 2013


The branch, 4.0/return-errors-on-template-create has been created
        at  485069c86569a9f59eefe21f27639e08db7bbddd (commit)

- Log -----------------------------------------------------------------
commit 310bd0799f3c94bd0e0960e8467c4ce238e10e74
Author: John Kelsh <jkelsh at gmail.com>
Date:   Thu Oct 17 11:21:25 2013 +1030

    Update RT::Template->Create to return failure message if requested when called.

diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index fd4b511..0e67356 100644
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -256,7 +256,7 @@ sub Create {
         $args{'Queue'} = $QueueObj->Id;
     }
 
-    my $result = $self->SUPER::Create(
+    my ( $result, $msg ) = $self->SUPER::Create(
         Content     => $args{'Content'},
         Queue       => $args{'Queue'},
         Description => $args{'Description'},
@@ -264,7 +264,11 @@ sub Create {
         Type        => $args{'Type'},
     );
 
-    return ($result);
+    if ( wantarray ) {
+    	return ( $result, $msg );
+    } else {
+    	return ( $result );
+    }
 
 }
 

commit 485069c86569a9f59eefe21f27639e08db7bbddd
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue Oct 22 14:25:49 2013 -0400

    Fix tab weirdness

diff --git a/lib/RT/Template.pm b/lib/RT/Template.pm
index 0e67356..120d412 100644
--- a/lib/RT/Template.pm
+++ b/lib/RT/Template.pm
@@ -265,9 +265,9 @@ sub Create {
     );
 
     if ( wantarray ) {
-    	return ( $result, $msg );
+        return ( $result, $msg );
     } else {
-    	return ( $result );
+        return ( $result );
     }
 
 }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list