diff options
Diffstat (limited to 'rt/lib/RT/Action/Generic.pm')
-rwxr-xr-x | rt/lib/RT/Action/Generic.pm | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/rt/lib/RT/Action/Generic.pm b/rt/lib/RT/Action/Generic.pm index 5e80f40d7..cf7600a63 100755 --- a/rt/lib/RT/Action/Generic.pm +++ b/rt/lib/RT/Action/Generic.pm @@ -1,8 +1,8 @@ -# {{{ BEGIN BPS TAGGED BLOCK +# BEGIN BPS TAGGED BLOCK {{{ # # COPYRIGHT: # -# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC # <jesse@bestpractical.com> # # (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,8 @@ # works based on those contributions, and sublicense and distribute # those contributions and any derivatives thereof. # -# }}} END BPS TAGGED BLOCK +# END BPS TAGGED BLOCK }}} + =head1 NAME RT::Action::Generic - a generic baseclass for RT Actions @@ -84,31 +85,31 @@ sub new { # {{{ sub _Init sub _Init { my $self = shift; - my %args = ( TransactionObj => undef, - TicketObj => undef, - ScripObj => undef, - TemplateObj => undef, - Argument => undef, - Type => undef, - CurrentUser => undef, - @_ ); - - + my %args = ( Argument => undef, + CurrentUser => undef, + ScripActionObj => undef, + ScripObj => undef, + TemplateObj => undef, + TicketObj => undef, + TransactionObj => undef, + Type => undef, + + @_ ); + $self->{'Argument'} = $args{'Argument'}; + $self->CurrentUser( $args{'CurrentUser'}); + $self->{'ScripActionObj'} = $args{'ScripActionObj'}; $self->{'ScripObj'} = $args{'ScripObj'}; + $self->{'TemplateObj'} = $args{'TemplateObj'}; $self->{'TicketObj'} = $args{'TicketObj'}; $self->{'TransactionObj'} = $args{'TransactionObj'}; - $self->{'TemplateObj'} = $args{'TemplateObj'}; $self->{'Type'} = $args{'Type'}; - $self->CurrentUser( $args{'CurrentUser'}); - Scalar::Util::weaken($self->{'ScripObj'}); - Scalar::Util::weaken($self->{'TicketObj'}); - Scalar::Util::weaken($self->{'TemplateObj'}); - Scalar::Util::weaken($self->{'TransactionObj'}); - - - + Scalar::Util::weaken($self->{'ScripActionObj'}); + Scalar::Util::weaken($self->{'ScripObj'}); + Scalar::Util::weaken($self->{'TemplateObj'}); + Scalar::Util::weaken($self->{'TicketObj'}); + Scalar::Util::weaken($self->{'TransactionObj'}); } # }}} @@ -150,6 +151,13 @@ sub ScripObj { } # }}} +# {{{ sub ScripActionObj +sub ScripActionObj { + my $self = shift; + return($self->{'ScripActionObj'}); +} +# }}} + # {{{ sub Type sub Type { my $self = shift; @@ -205,13 +213,11 @@ sub DESTROY { # We need to clean up all the references that might maybe get # oddly circular + $self->{'ScripActionObj'} = undef; + $self->{'ScripObj'} = undef; $self->{'TemplateObj'} =undef $self->{'TicketObj'} = undef; $self->{'TransactionObj'} = undef; - $self->{'ScripObj'} = undef; - - - } # }}} |