[Rt-commit] r8379 - in rt/branches/3.7-EXPERIMENTAL-TUNIS: .

thayes at bestpractical.com thayes at bestpractical.com
Thu Aug 2 10:39:35 EDT 2007


Author: thayes
Date: Thu Aug  2 10:39:34 2007
New Revision: 8379

Modified:
   rt/branches/3.7-EXPERIMENTAL-TUNIS/   (props changed)
   rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html

Log:
 r8559 at toth:  toth | 2007-08-02 10:37:43 -0400
 * Changed to accomodate string argument for new locking methods
 


Modified: rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html
==============================================================================
--- rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html	(original)
+++ rt/branches/3.7-EXPERIMENTAL-TUNIS/html/Ticket/Display.html	Thu Aug  2 10:39:34 2007
@@ -128,25 +128,14 @@
     if ( defined $ARGS{'Action'} ) {
         if ($ARGS{'Action'} =~ /^(Steal|Kill|Take|SetTold)$/) {
             my $action = $1;
-            my $lock = $TicketObj->Locked();
-            if($lock && $lock->Content->{'User'} != $session{'CurrentUser'}->id)
-            {
-            	my $u = RT::User->new($session{'CurrentUser'});
-				$u->Load($lock->Content->{'User'});
-            	push @Actions, "Cannot $action: Ticket locked by " . $u->Name . ' and cannot be modified';
-            }
-            elsif(!$lock)
-            {
-            	$TicketObj->Lock();
-				my ($res, $msg) = $TicketObj->$action();
-				push(@Actions, $msg);
-			}
+			my ($res, $msg) = $TicketObj->$action();
+			push(@Actions, $msg);
         }
     }
     
     if ( defined $ARGS{'Lock'} ) {
         if ( $ARGS{'Lock'} eq 'add' ) {
-            if ( $TicketObj->Lock(1) ) {
+            if ( $TicketObj->Lock('Hard') ) {
                 push @Actions, loc('You now have a lock on this ticket');
             } else {
                 push @Actions, loc('Your attempt to lock this ticket failed');
@@ -157,7 +146,7 @@
                 push @Actions, loc('This ticket was not locked');
 			} elsif ( $lock->Content->{'User'} == $session{'CurrentUser'}->id ) {
 				$Duration = time() - $lock->Content->{'Timestamp'};
-				$TicketObj->Unlock(1);
+				$TicketObj->Unlock('Hard');
                 push @Actions, loc('You have unlocked this ticket');
 			} else {
 				push @Actions,


More information about the Rt-commit mailing list