X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Flib%2FRT%2FScripAction_Overlay.pm;h=4b93c6c54279cf25dcef4f6af0199d06afbe93a4;hp=c0a10caf752491a1381a9a6909103ce2c7e43891;hb=8103c1fc1b2c27a6855feadf26f91b980a54bc52;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de diff --git a/rt/lib/RT/ScripAction_Overlay.pm b/rt/lib/RT/ScripAction_Overlay.pm index c0a10caf7..4b93c6c54 100644 --- a/rt/lib/RT/ScripAction_Overlay.pm +++ b/rt/lib/RT/ScripAction_Overlay.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-2007 Best Practical Solutions, LLC # # # (Except where explicitly superseded by other copyright notices) @@ -22,7 +22,9 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 or visit their web page on the internet at +# http://www.gnu.org/copyleft/gpl.html. # # # CONTRIBUTION SUBMISSION POLICY: @@ -42,7 +44,7 @@ # 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::ScripAction - RT Action object @@ -68,6 +70,9 @@ ok (require RT::ScripAction); =cut + +package RT::ScripAction; + use strict; no warnings qw(redefine); use RT::Template; @@ -89,10 +94,12 @@ sub _Accessible { # }}} # {{{ sub Create + =head2 Create - - Takes a hash. Creates a new Action entry. - should be better documented. + +Takes a hash. Creates a new Action entry. should be better +documented. + =cut sub Create { @@ -111,6 +118,15 @@ sub Delete { # }}} # {{{ sub Load + +=head2 Load IDENTIFIER + +Loads an action by its Name. + +Returns: Id, Error Message + +=cut + sub Load { my $self = shift; my $identifier = shift; @@ -133,7 +149,7 @@ sub Load { $self->{'Template'} = $template; } - return ($self->loc('[_1] ScripAction loaded', $self->Id)); + return ($self->Id, ($self->loc('[_1] ScripAction loaded', $self->Id))); } # }}} @@ -160,13 +176,13 @@ sub LoadAction { eval "require $type" || die "Require of $type failed.\n$@\n"; - $self->{'Action'} = $type->new ( ScripActionObj => $self, - TicketObj => $args{'TicketObj'}, - ScripObj => $args{'ScripObj'}, - TransactionObj => $args{'TransactionObj'}, - TemplateObj => $self->TemplateObj, - Argument => $self->Argument, - CurrentUser => $self->CurrentUser + $self->{'Action'} = $type->new ( Argument => $self->Argument, + CurrentUser => $self->CurrentUser, + ScripActionObj => $self, + ScripObj => $args{'ScripObj'}, + TemplateObj => $self->TemplateObj, + TicketObj => $args{'TicketObj'}, + TransactionObj => $args{'TransactionObj'}, ); } # }}} @@ -214,6 +230,7 @@ sub TemplateObj { sub Prepare { my $self = shift; + $self->{_Message_ID} = 0; return ($self->Action->Prepare()); }