[Rt-commit] rt branch, 4.2-trunk, updated. rt-4.2.3-169-ga7766ac

Alex Vandiver alexmv at bestpractical.com
Tue Apr 29 15:25:22 EDT 2014


The branch, 4.2-trunk has been updated
       via  a7766ace6d5f7ce56fe15d7fd9272eb1be7d0dfd (commit)
      from  1aaeb2cad272a62b05eb7679483f555771e0337e (commit)

Summary of changes:
 lib/RT/Queue.pm | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

- Log -----------------------------------------------------------------
commit a7766ace6d5f7ce56fe15d7fd9272eb1be7d0dfd
Author: Alex Vandiver <alexmv at bestpractical.com>
Date:   Tue Apr 29 15:17:14 2014 -0400

    Fix SetDisabled's warning message and return value on failure
    
    Fixes I#29802.

diff --git a/lib/RT/Queue.pm b/lib/RT/Queue.pm
index 6ca78c4..46d30d7 100644
--- a/lib/RT/Queue.pm
+++ b/lib/RT/Queue.pm
@@ -245,11 +245,11 @@ sub SetDisabled {
     my $val = shift;
 
     $RT::Handle->BeginTransaction();
-    my $set_err = $self->_Set( Field =>'Disabled', Value => $val);
-    unless ($set_err) {
+    my ($ok, $msg) = $self->_Set( Field =>'Disabled', Value => $val);
+    unless ($ok) {
         $RT::Handle->Rollback();
-        $RT::Logger->warning("Couldn't ".($val == 1) ? "disable" : "enable"." queue ".$self->Name);
-        return (undef);
+        $RT::Logger->warning("Couldn't ".(($val == 1) ? "disable" : "enable")." queue ".$self->Name.": $msg");
+        return ($ok, $msg);
     }
     $self->_NewTransaction( Type => ($val == 1) ? "Disabled" : "Enabled" );
 

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


More information about the rt-commit mailing list