[otrs-cvs] otrs/Kernel/Modules AgentTicketWatcher.pm,1.8,1.9

CVS commits notifications of OTRS.org cvs-log at otrs.org
Tue May 6 22:31:59 GMT 2008


Comments:
Update of /home/cvs/otrs/Kernel/Modules
In directory lancelot:/tmp/cvs-serv17195/Kernel/Modules

Modified Files:
	AgentTicketWatcher.pm 
Log Message:
Improved code layout.

Author: martin

Index: AgentTicketWatcher.pm
===================================================================
RCS file: /home/cvs/otrs/Kernel/Modules/AgentTicketWatcher.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** AgentTicketWatcher.pm	31 Jan 2008 06:22:12 -0000	1.8
--- AgentTicketWatcher.pm	6 May 2008 22:31:54 -0000	1.9
***************
*** 70,86 ****
  
          # set subscribe
!         if ($Self->{TicketObject}->TicketWatchSubscribe(
!                 TicketID => $Self->{TicketID},
!                 UserID   => $Self->{UserID},
!             )
!             )
!         {
  
!             # redirect
!             return $Self->{LayoutObject}->Redirect( OP => $Self->{LastScreenView} );
!         }
!         else {
              return $Self->{LayoutObject}->ErrorScreen();
          }
      }
  
--- 70,85 ----
  
          # set subscribe
!         my $Subscribe = $Self->{TicketObject}->TicketWatchSubscribe(
!             TicketID    => $Self->{TicketID},
!             WatchUserID => $Self->{UserID},
!             UserID      => $Self->{UserID},
!         );
  
!         if ( !$Subscribe ) {
              return $Self->{LayoutObject}->ErrorScreen();
          }
+ 
+         # redirect
+         return $Self->{LayoutObject}->Redirect( OP => $Self->{LastScreenView} );
      }
  
***************
*** 89,103 ****
      # ------------------------------------------------------------ #
      elsif ( $Self->{Subaction} eq 'Unsubscribe' ) {
!         if ($Self->{TicketObject}->TicketWatchUnsubscribe(
!                 TicketID => $Self->{TicketID},
!                 UserID   => $Self->{UserID},
!             )
!             )
!         {
!             return $Self->{LayoutObject}->Redirect( OP => $Self->{LastScreenView} );
!         }
!         else {
              return $Self->{LayoutObject}->ErrorScreen();
          }
      }
  }
--- 88,103 ----
      # ------------------------------------------------------------ #
      elsif ( $Self->{Subaction} eq 'Unsubscribe' ) {
!         my $Unsubscribe = $Self->{TicketObject}->TicketWatchUnsubscribe(
!             TicketID    => $Self->{TicketID},
!             WatchUserID => $Self->{UserID},
!             UserID      => $Self->{UserID},
!         );
! 
!         if ( !$Unsubscribe ) {
              return $Self->{LayoutObject}->ErrorScreen();
          }
+ 
+         # redirect
+         return $Self->{LayoutObject}->Redirect( OP => $Self->{LastScreenView} );
      }
  }


More information about the cvs-log mailing list