[Rt-commit] r5218 - rt/branches/3.4-RELEASE/lib/RT

ruz at bestpractical.com ruz at bestpractical.com
Fri May 12 20:31:35 EDT 2006


Author: ruz
Date: Fri May 12 20:31:33 2006
New Revision: 5218

Modified:
   rt/branches/3.4-RELEASE/lib/RT/CustomField_Overlay.pm
   rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm
   rt/branches/3.4-RELEASE/lib/RT/Tickets_Overlay.pm

Log:
* get rid of "masks earlier declaration" warnings

Modified: rt/branches/3.4-RELEASE/lib/RT/CustomField_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/CustomField_Overlay.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/CustomField_Overlay.pm	Fri May 12 20:31:33 2006
@@ -876,10 +876,10 @@
     if ( $ObjectCF->Id ) {
         return ( 0, $self->loc("That is already the current value") );
     }
-    my ( $id, $msg ) =
+    my ( $oid, $msg ) =
       $ObjectCF->Create( ObjectId => $id, CustomField => $self->Id );
 
-    return ( $id, $msg );
+    return ( $oid, $msg );
 }
 
 
@@ -911,9 +911,10 @@
     unless ( $ObjectCF->Id ) {
         return ( 0, $self->loc("This custom field does not apply to that object") );
     }
-    my ( $id, $msg ) = $ObjectCF->Delete;
+    # XXX: Delete doesn't return anything
+    my ( $oid, $msg ) = $ObjectCF->Delete;
 
-    return ( $id, $msg );
+    return ( $oid, $msg );
 }
 
 # {{{ AddValueForObject

Modified: rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Ticket_Overlay.pm	Fri May 12 20:31:33 2006
@@ -3018,21 +3018,21 @@
 
     $RT::Handle->Commit();
 
-    my ( $trans, $msg, undef ) = $self->_NewTransaction(
-                                                   Type     => $Type,
-                                                   Field    => 'Owner',
-                                                   NewValue => $NewOwnerObj->Id,
-                                                   OldValue => $OldOwnerObj->Id,
-                                                   TimeTaken => 0 );
+    ($val, $msg) = $self->_NewTransaction(
+        Type      => $Type,
+        Field     => 'Owner',
+        NewValue  => $NewOwnerObj->Id,
+        OldValue  => $OldOwnerObj->Id,
+        TimeTaken => 0,
+    );
 
-    if ($trans) {
+    if ( $val ) {
         $msg = $self->loc( "Owner changed from [_1] to [_2]",
                            $OldOwnerObj->Name, $NewOwnerObj->Name );
 
         # TODO: make sure the trans committed properly
     }
-    return ( $trans, $msg );
-
+    return ( $val, $msg );
 }
 
 # }}}

Modified: rt/branches/3.4-RELEASE/lib/RT/Tickets_Overlay.pm
==============================================================================
--- rt/branches/3.4-RELEASE/lib/RT/Tickets_Overlay.pm	(original)
+++ rt/branches/3.4-RELEASE/lib/RT/Tickets_Overlay.pm	Fri May 12 20:31:33 2006
@@ -913,7 +913,7 @@
     # RT doesn't allow to add groups as members of the
     # ticket roles, so we just hide entries in CGM table
     # with MemberId == GroupId from results
-    my $groupmembers = $self->SUPER::Limit(
+    $self->SUPER::Limit(
         LEFTJOIN   => $groupmembers,
         FIELD      => 'GroupId',
         OPERATOR   => '!=',


More information about the Rt-commit mailing list